public class GeoJsonInputFormat
extends org.apache.hadoop.mapreduce.lib.input.FileInputFormat<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text>
implements org.apache.hadoop.conf.Configurable
FileInputFormat
for GeoJSON text files. Multi-line JSON is supported. By default the input format will search for feature objects , this can be changed by providing a different parsing type. Keys are the position in the file, and values are the GeoJSON text. The GeoJSON text is not validated during the parsing.Constructor and Description |
---|
GeoJsonInputFormat() |
Modifier and Type | Method and Description |
---|---|
org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text> |
createRecordReader(org.apache.hadoop.mapreduce.InputSplit split, org.apache.hadoop.mapreduce.TaskAttemptContext context) |
org.apache.hadoop.conf.Configuration |
getConf() |
static GeoJsonParseType |
getGeoJsonTypesToParse(org.apache.hadoop.conf.Configuration conf)
Returns the GeoJSON parsing type
|
protected boolean |
isSplitable(org.apache.hadoop.mapreduce.JobContext context, org.apache.hadoop.fs.Path fileName) |
void |
setConf(org.apache.hadoop.conf.Configuration conf) |
static void |
setGeoJsonTypesToParse(org.apache.hadoop.conf.Configuration conf, GeoJsonParseType parseType)
Sets GeoJSON parsing type.
|
addInputPath, addInputPaths, computeSplitSize, getBlockIndex, getFormatMinSplitSize, getInputPathFilter, getInputPaths, getMaxSplitSize, getMinSplitSize, getSplits, listStatus, setInputPathFilter, setInputPaths, setInputPaths, setMaxInputSplitSize, setMinInputSplitSize
public static void setGeoJsonTypesToParse(org.apache.hadoop.conf.Configuration conf, GeoJsonParseType parseType)
conf
- the job configurationparseType
- the GeoJSON parsing typepublic static GeoJsonParseType getGeoJsonTypesToParse(org.apache.hadoop.conf.Configuration conf)
conf
- the job configurationprotected boolean isSplitable(org.apache.hadoop.mapreduce.JobContext context, org.apache.hadoop.fs.Path fileName)
isSplitable
in class org.apache.hadoop.mapreduce.lib.input.FileInputFormat<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text>
public org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text> createRecordReader(org.apache.hadoop.mapreduce.InputSplit split, org.apache.hadoop.mapreduce.TaskAttemptContext context) throws java.io.IOException, java.lang.InterruptedException
createRecordReader
in class org.apache.hadoop.mapreduce.InputFormat<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text>
java.io.IOException
java.lang.InterruptedException
public org.apache.hadoop.conf.Configuration getConf()
getConf
in interface org.apache.hadoop.conf.Configurable
public void setConf(org.apache.hadoop.conf.Configuration conf)
setConf
in interface org.apache.hadoop.conf.Configurable
Copyright © 2016 Oracle and/or its affiliates. All Rights Reserved.