Class AvroMapperGenerator<OBJ>
- java.lang.Object
-
- uk.gov.gchq.gaffer.hdfs.operation.mapper.generator.AvroMapperGenerator<OBJ>
-
- All Implemented Interfaces:
MapperGenerator<org.apache.avro.mapred.AvroKey<OBJ>,org.apache.hadoop.io.NullWritable>
public class AvroMapperGenerator<OBJ> extends Object implements MapperGenerator<org.apache.avro.mapred.AvroKey<OBJ>,org.apache.hadoop.io.NullWritable>
AnAvroMapperGenerator
is aMapperGenerator
that can handle Avro input data and convert it into anIterable
ofElement
s.
-
-
Constructor Summary
Constructors Constructor Description AvroMapperGenerator()
AvroMapperGenerator(Function<Iterable<? extends OBJ>,Iterable<? extends Element>> elementGenerator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Function<Iterable<? extends OBJ>,Iterable<? extends Element>>
getElementGenerator()
Iterable<? extends Element>
getElements(org.apache.avro.mapred.AvroKey<OBJ> keyIn, org.apache.hadoop.io.NullWritable valueIn, org.apache.hadoop.mapreduce.MapContext<org.apache.avro.mapred.AvroKey<OBJ>,org.apache.hadoop.io.NullWritable,?,?> context)
void
setElementGenerator(Function<Iterable<? extends OBJ>,Iterable<? extends Element>> elementGenerator)
-
-
-
Method Detail
-
getElements
public Iterable<? extends Element> getElements(org.apache.avro.mapred.AvroKey<OBJ> keyIn, org.apache.hadoop.io.NullWritable valueIn, org.apache.hadoop.mapreduce.MapContext<org.apache.avro.mapred.AvroKey<OBJ>,org.apache.hadoop.io.NullWritable,?,?> context)
- Specified by:
getElements
in interfaceMapperGenerator<org.apache.avro.mapred.AvroKey<OBJ>,org.apache.hadoop.io.NullWritable>
-
getElementGenerator
public Function<Iterable<? extends OBJ>,Iterable<? extends Element>> getElementGenerator()
-
-