public class AvroMapper<IN,OUT> extends org.apache.hadoop.conf.Configured implements org.apache.hadoop.mapred.JobConfigurable, Closeable
Applications subclass this class and pass their subclass to
AvroJob.setMapperClass(JobConf, Class)
, overriding
map(Object, AvroCollector, Reporter)
.
Constructor and Description |
---|
AvroMapper() |
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 |
map(IN datum,
AvroCollector<OUT> collector,
org.apache.hadoop.mapred.Reporter reporter)
Called with each map input datum.
|
public void map(IN datum, AvroCollector<OUT> collector, org.apache.hadoop.mapred.Reporter reporter) throws IOException
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–2021 The Apache Software Foundation. All rights reserved.