@InterfaceAudience.Public @InterfaceStability.Stable public class ValueAggregatorCombiner<K1 extends WritableComparable,V1 extends Writable> extends ValueAggregatorJobBase<K1,V1>
aggregatorDescriptorList
Constructor and Description |
---|
ValueAggregatorCombiner() |
Modifier and Type | Method and Description |
---|---|
void |
close()
Do nothing.
|
void |
configure(JobConf job)
Combiner does not need to configure.
|
void |
map(K1 arg0,
V1 arg1,
OutputCollector<Text,Text> arg2,
Reporter arg3)
Do nothing.
|
void |
reduce(Text key,
Iterator<Text> values,
OutputCollector<Text,Text> output,
Reporter reporter)
Combines values for a given key.
|
logSpec
public void configure(JobConf job)
configure
in interface JobConfigurable
configure
in class ValueAggregatorJobBase<K1 extends WritableComparable,V1 extends Writable>
job
- the configurationpublic void reduce(Text key, Iterator<Text> values, OutputCollector<Text,Text> output, Reporter reporter) throws IOException
key
- the key is expected to be a Text object, whose prefix indicates
the type of aggregation to aggregate the values.values
- the values to combineoutput
- to collect combined valuesreporter
- facility to report progress.IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class ValueAggregatorJobBase<K1 extends WritableComparable,V1 extends Writable>
IOException
public void map(K1 arg0, V1 arg1, OutputCollector<Text,Text> arg2, Reporter arg3) throws IOException
arg0
- the input key.arg1
- the input value.arg2
- collects mapped keys and values.arg3
- facility to report progress.IOException
Copyright © 2017 Apache Software Foundation. All rights reserved.