Package org.apache.avro.mapred
Class AvroReducer<K,V,OUT>
java.lang.Object
org.apache.hadoop.conf.Configured
org.apache.avro.mapred.AvroReducer<K,V,OUT>
- All Implemented Interfaces:
Closeable,AutoCloseable,Configurable,JobConfigurable
A reducer for Avro data.
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Subclasses can override this as desired.voidSubclasses can override this as desired.voidCalled with all map output values with a given key.Methods inherited from class org.apache.hadoop.conf.Configured
getConf, setConf
-
Constructor Details
-
AvroReducer
public AvroReducer()
-
-
Method Details
-
reduce
public void reduce(K key, Iterable<V> values, AvroCollector<OUT> collector, Reporter reporter) throws IOException Called with all map output values with a given key. By default, pairs key with each value, collectingPairinstances.- Throws:
IOException
-
close
Subclasses can override this as desired.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
configure
Subclasses can override this as desired.- Specified by:
configurein interfaceJobConfigurable
-