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