public class AvroMapper<IN,OUT> extends Configured implements 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(JobConf jobConf)
Subclasses can override this as desired.
|
void |
map(IN datum,
AvroCollector<OUT> collector,
Reporter reporter)
Called with each map input datum.
|
getConf, setConf
public void map(IN datum, AvroCollector<OUT> collector, Reporter reporter) throws IOException
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-2014 The Apache Software Foundation. All Rights Reserved.