public class AvroReducer<K,V,OUT> extends Configured implements 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(JobConf jobConf)
Subclasses can override this as desired.
|
void |
reduce(K key,
Iterable<V> values,
AvroCollector<OUT> collector,
Reporter reporter)
Called with all map output values with a given key.
|
getConf, setConf
public void reduce(K key, Iterable<V> values, AvroCollector<OUT> collector, Reporter reporter) throws IOException
Pair
instances.IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
public void configure(JobConf jobConf)
configure
in interface JobConfigurable
Copyright © 2009–2022 The Apache Software Foundation. All rights reserved.