Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class SomeUDAF extends UDAF {
- static final Log LOG = LogFactory.getLog(UDAFFoldIn.class.getName());
- public static class SomeUDAFEvaluator implements UDAFEvaluator{
- public static class FinalResult{
- //class to stores partial results
- }
- public static class PartialResult{
- //class to store final result
- }
- public void init() {
- //initialize
- }
- public boolean aggregate(DoubleWritable wm, DoubleWritable lambda,
- //aggregate values
- return true;
- }
- public PartialResult evaluatePartial(){
- //return partial result
- return new PartialResult();
- }
- public boolean aggregatePartial(PartialResult other) throws Exception{
- //aggregate partial
- return true;
- }
- public FinalResult evaluate(){
- //return final result
- return new FinalResult();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement