public class BufferMapper extends org.apache.hadoop.mapred.MapReduceBase implements org.apache.hadoop.mapred.Mapper<org.apache.hadoop.io.NullWritable,org.apache.hadoop.mapred.FileSplit,org.apache.hadoop.io.Text,RecordInfo>
A mapper implementation that generates a buffer for each record containing a geometry. The FileSplit given as input value represents the split to be read using an internalInputFormat. A configured RecordInfoProvider implementation is used then to get the id and geometry of each record.
The mapper's output is the record's id as key and the buffered geometry as value. The following parameters are expected in the configuration:
ConfigParams.BUFFER_WIDTH
ConfigParams.BUFFER_SMA
- optionalConfigParams.BUFFER_IFLAT
- optionalConfigParams.BUFFER_ARCT
- optionalModifier and Type | Field and Description |
---|---|
static double |
MISSING_VALUE |
Constructor and Description |
---|
BufferMapper() |
Modifier and Type | Method and Description |
---|---|
void |
configure(org.apache.hadoop.mapred.JobConf conf) |
void |
map(org.apache.hadoop.io.NullWritable key, org.apache.hadoop.mapred.FileSplit value, org.apache.hadoop.mapred.OutputCollector<org.apache.hadoop.io.Text,RecordInfo> output, org.apache.hadoop.mapred.Reporter reporter) |
public static final double MISSING_VALUE
public void configure(org.apache.hadoop.mapred.JobConf conf)
configure
in interface org.apache.hadoop.mapred.JobConfigurable
configure
in class org.apache.hadoop.mapred.MapReduceBase
public void map(org.apache.hadoop.io.NullWritable key, org.apache.hadoop.mapred.FileSplit value, org.apache.hadoop.mapred.OutputCollector<org.apache.hadoop.io.Text,RecordInfo> output, org.apache.hadoop.mapred.Reporter reporter) throws java.io.IOException
map
in interface org.apache.hadoop.mapred.Mapper<org.apache.hadoop.io.NullWritable,org.apache.hadoop.mapred.FileSplit,org.apache.hadoop.io.Text,RecordInfo>
java.io.IOException
Copyright © 2016 Oracle and/or its affiliates. All Rights Reserved.