cgl.imr.base.impl
Class HashBasedReducerSelector

java.lang.Object
  extended by cgl.imr.base.ReducerSelector
      extended by cgl.imr.base.impl.HashBasedReducerSelector

public class HashBasedReducerSelector
extends ReducerSelector

Hash value based output format. Identify a Reduce worker for given Key.


Field Summary
 
Fields inherited from class cgl.imr.base.ReducerSelector
jobId, numReducers, sinkBase
 
Constructor Summary
HashBasedReducerSelector()
           
HashBasedReducerSelector(int numReducers, String sinkBase, String jobId)
           
 
Method Summary
 int getReducerNumber(Key key)
          Simply returns the hashCode()% number of reduce tasks.
 
Methods inherited from class cgl.imr.base.ReducerSelector
configure, getJobId, getNumReducers, getSinkBase
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HashBasedReducerSelector

public HashBasedReducerSelector()

HashBasedReducerSelector

public HashBasedReducerSelector(int numReducers,
                                String sinkBase,
                                String jobId)
Method Detail

getReducerNumber

public int getReducerNumber(Key key)
Simply returns the hashCode()% number of reduce tasks.

Specified by:
getReducerNumber in class ReducerSelector
Returns:
reducer number for this key.


For comments and suggestions please send e-mail to