public class CollapsingMapper extends ObjectMapper implements java.io.Serializable
AbstractPartitionCollapsingIncrementalJob and its derived classes.
An implementation of Mapper is used for the
map operation, which produces key and intermediate value pairs from the input.
| Constructor and Description |
|---|
CollapsingMapper() |
| Modifier and Type | Method and Description |
|---|---|
Mapper<org.apache.avro.generic.GenericRecord,org.apache.avro.generic.GenericRecord,org.apache.avro.generic.GenericRecord> |
getMapper()
Gets the mapper.
|
boolean |
getReuseOutput()
Gets whether previous output is being reused.
|
PartitionCollapsingSchemas |
getSchemas()
Gets the Avro schemas.
|
void |
map(java.lang.Object inputObj,
org.apache.hadoop.mapreduce.MapContext<java.lang.Object,java.lang.Object,java.lang.Object,java.lang.Object> context) |
void |
setContext(org.apache.hadoop.mapreduce.TaskInputOutputContext<java.lang.Object,java.lang.Object,java.lang.Object,java.lang.Object> context) |
void |
setMapper(Mapper<org.apache.avro.generic.GenericRecord,org.apache.avro.generic.GenericRecord,org.apache.avro.generic.GenericRecord> mapper)
Sets the mapper.
|
void |
setReuseOutput(boolean reuseOutput)
Sets whether previous output is being reused.
|
void |
setSchemas(PartitionCollapsingSchemas schemas)
Sets the Avro schemas.
|
close, getContextpublic void map(java.lang.Object inputObj,
org.apache.hadoop.mapreduce.MapContext<java.lang.Object,java.lang.Object,java.lang.Object,java.lang.Object> context)
throws java.io.IOException,
java.lang.InterruptedException
map in class ObjectMapperjava.io.IOExceptionjava.lang.InterruptedExceptionpublic boolean getReuseOutput()
public void setReuseOutput(boolean reuseOutput)
reuseOutput - true if previous output is reusedpublic void setContext(org.apache.hadoop.mapreduce.TaskInputOutputContext<java.lang.Object,java.lang.Object,java.lang.Object,java.lang.Object> context)
setContext in class ObjectProcessorpublic Mapper<org.apache.avro.generic.GenericRecord,org.apache.avro.generic.GenericRecord,org.apache.avro.generic.GenericRecord> getMapper()
public void setMapper(Mapper<org.apache.avro.generic.GenericRecord,org.apache.avro.generic.GenericRecord,org.apache.avro.generic.GenericRecord> mapper)
mapper - the mapperpublic void setSchemas(PartitionCollapsingSchemas schemas)
schemas - the schemaspublic PartitionCollapsingSchemas getSchemas()