public class ReverseLink extends MapReduceAlgorithm
Red (cxh) |
Red (cxh) |
reduceKey, reduceOutput, reduceValues
Constructor and Description |
---|
ReverseLink() |
Modifier and Type | Method and Description |
---|---|
java.util.List<KeyValuePair> |
map(java.lang.String key,
java.lang.String value)
Subclasses should implement their map method here.
|
java.util.List<java.lang.String> |
reduce(java.lang.String key,
java.util.concurrent.BlockingQueue<java.lang.String> values)
Subclasses should implement their reduce method here,
calling the take method of the BlockingQueue to get
the next value, and checking the parameter noMoreInputs
to test if no more values can be put on the queue.
|
isQueueEmpty, isReduceFinished, run, setNoMoreInputs
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
public java.util.List<KeyValuePair> map(java.lang.String key, java.lang.String value)
MapReduceAlgorithm
map
in class MapReduceAlgorithm
key
- The key passed to the map method.value
- The value passed to the map method.public java.util.List<java.lang.String> reduce(java.lang.String key, java.util.concurrent.BlockingQueue<java.lang.String> values) throws java.lang.InterruptedException
MapReduceAlgorithm
reduce
in class MapReduceAlgorithm
key
- The key to reduce over.values
- The queue of values in reduction.java.lang.InterruptedException
- If thrown while reducing.