org.apache.avro.mapred

## Class AvroMapper<IN,OUT>

- java.lang.Object
- - org.apache.hadoop.conf.Configured
  - - org.apache.avro.mapred.AvroMapper<IN,OUT>

All Implemented Interfaces:
  Closeable, AutoCloseable, Configurable, JobConfigurable

    public class AvroMapper<IN,OUT>
    extends Configured
    implements JobConfigurable, Closeable

A mapper for Avro data.

Applications subclass this class and pass their subclass to `AvroJob.setMapperClass(JobConf, Class)`, overriding `map(Object, AvroCollector, Reporter)`.

### Constructor Summary

Constructors
Constructor and Description
`AvroMapper()`

### Method Summary

All Methods Instance Methods Concrete Methods
`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.

### Methods inherited from class org.apache.hadoop.conf.Configured

`getConf, setConf`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### AvroMapper

    public AvroMapper()

### Method Detail

#### map

    public void map(IN datum,
                    AvroCollector<OUT> collector,
                    Reporter reporter)
             throws IOException

Called with each map input datum. By default, collects inputs.

Throws:
  `IOException`

#### close

    public void close()
               throws IOException

Subclasses can override this as desired.

Specified by:
  `close` in interface `Closeable`
Specified by:
  `close` in interface `AutoCloseable`
Throws:
  `IOException`

#### configure

    public void configure(JobConf jobConf)

Subclasses can override this as desired.

Specified by:
  `configure` in interface `JobConfigurable`