cgl.imr.worker
Class Reducer

java.lang.Object
  extended by cgl.imr.worker.Reducer
All Implemented Interfaces:
Runnable

public class Reducer
extends Object
implements Runnable

Executor for reduce tasks.Reducer holds the map outputs assigned to it until all the outputs are received. Then it executes the reduce task.


Constructor Summary
Reducer(PubSubService pubsubService, ReducerRequest request, CustomClassLoader classLoader)
           
 
Method Summary
 void handleReduceInputMessage(ReduceInput reduceInput)
          Adds the reduce inputs to the reduceinputs.
 boolean isAllReduceInputsReceived()
          Check if all the reduce inputs have received.
 void run()
           
 void terminate()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Reducer

public Reducer(PubSubService pubsubService,
               ReducerRequest request,
               CustomClassLoader classLoader)
        throws TwisterException
Throws:
TwisterException
Method Detail

handleReduceInputMessage

public void handleReduceInputMessage(ReduceInput reduceInput)
Adds the reduce inputs to the reduceinputs.

Parameters:
reduceInput -

isAllReduceInputsReceived

public boolean isAllReduceInputsReceived()
Check if all the reduce inputs have received.

Returns:
true if all reduce inputs received, false otherwise.

run

public void run()
Specified by:
run in interface Runnable

terminate

public void terminate()
               throws TwisterException
Throws:
TwisterException


For comments and suggestions please send e-mail to