public abstract class DataJoinReducerBase extends JobBase
| Modifier and Type | Field and Description |
|---|---|
protected long |
collected |
protected JobConf |
job |
protected long |
largestNumOfValues |
static Text |
NUM_OF_VALUES_FIELD |
protected long |
numOfValues |
protected Reporter |
reporter |
static Text |
SOURCE_TAGS_FIELD |
| Constructor and Description |
|---|
DataJoinReducerBase() |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
protected void |
collect(Object key,
TaggedMapOutput aRecord,
OutputCollector output,
Reporter reporter)
The subclass can overwrite this method to perform additional filtering
and/or other processing logic before a value is collected.
|
protected abstract TaggedMapOutput |
combine(Object[] tags,
Object[] values) |
void |
configure(JobConf job)
Initializes a new instance from a
JobConf. |
protected ResetableIterator |
createResetableIterator()
The subclass can provide a different implementation on ResetableIterator.
|
void |
map(Object arg0,
Object arg1,
OutputCollector arg2,
Reporter arg3) |
void |
reduce(Object key,
Iterator values,
OutputCollector output,
Reporter reporter) |
addDoubleValue, addLongValue, getDoubleValue, getLongValue, getReport, report, setDoubleValue, setLongValueprotected Reporter reporter
protected long largestNumOfValues
protected long numOfValues
protected long collected
protected JobConf job
public static Text SOURCE_TAGS_FIELD
public static Text NUM_OF_VALUES_FIELD
public void close()
throws IOException
IOExceptionpublic void configure(JobConf job)
JobBaseJobConf.configure in interface JobConfigurableconfigure in class JobBasejob - the configurationprotected ResetableIterator createResetableIterator()
public void reduce(Object key, Iterator values, OutputCollector output, Reporter reporter) throws IOException
IOExceptionprotected void collect(Object key, TaggedMapOutput aRecord, OutputCollector output, Reporter reporter) throws IOException
key - aRecord - output - reporter - IOExceptionprotected abstract TaggedMapOutput combine(Object[] tags, Object[] values)
tags - a list of source tagsvalues - a value per sourcepublic void map(Object arg0, Object arg1, OutputCollector arg2, Reporter arg3) throws IOException
IOExceptionCopyright © 2018 CERN. All Rights Reserved.