public class AvroReducer<K,V,OUT> extends org.apache.hadoop.conf.Configured implements org.apache.hadoop.mapred.JobConfigurable, Closeable
Applications should subclass this class and pass their subclass to AvroJob.setReducerClass(JobConf, Class)
and perhaps AvroJob.setCombinerClass(JobConf, Class)
.
Subclasses override reduce(Object, Iterable, AvroCollector, Reporter)
.
Constructor and Description |
---|
AvroReducer() |
Modifier and Type | Method and Description |
---|---|
void |
close()
Subclasses can override this as desired.
|
void |
configure(org.apache.hadoop.mapred.JobConf jobConf)
Subclasses can override this as desired.
|
void |
reduce(K key,
Iterable<V> values,
AvroCollector<OUT> collector,
org.apache.hadoop.mapred.Reporter reporter)
Called with all map output values with a given key.
|
public void reduce(K key, Iterable<V> values, AvroCollector<OUT> collector, org.apache.hadoop.mapred.Reporter reporter) throws IOException
Pair
instances.IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
public void configure(org.apache.hadoop.mapred.JobConf jobConf)
configure
in interface org.apache.hadoop.mapred.JobConfigurable
Copyright © 2009-2013 The Apache Software Foundation. All Rights Reserved.