public static class WordCountArrayTuples.CountWords extends ReduceFunction
1
in the record. The other fields are not modified.| Constructor and Description |
|---|
WordCountArrayTuples.CountWords() |
| Modifier and Type | Method and Description |
|---|---|
void |
reduce(Iterator<Value[]> records,
Collector<Value[]> out)
The central function to be implemented for a reducer.
|
combine, getUDFMethodgetDataTypesclose, getIterationRuntimeContext, getRuntimeContext, open, setRuntimeContextclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclose, getRuntimeContext, open, setRuntimeContextpublic void reduce(Iterator<Value[]> records, Collector<Value[]> out) throws Exception
ReduceFunctionreduce in interface GenericReducer<Value[],Value[]>reduce in class ReduceFunctionrecords - All records that belong to the given input key.out - The collector to hand results to.Exception - Implementations may forward exceptions, which are caught by the runtime. When the
runtime catches an exception, it aborts the reduce task and lets the fail-over logic
decide whether to retry the reduce execution.Copyright © 2013–2014. All rights reserved.