public class GeoJsonInputFormat
extends org.apache.hadoop.mapred.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.conf.Configuration |
getConf() |
static GeoJsonParseType |
getGeoJsonTypesToParse(org.apache.hadoop.mapred.JobConf conf)
Returns the GeoJSON parsing type
|
org.apache.hadoop.mapred.RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text> |
getRecordReader(org.apache.hadoop.mapred.InputSplit split, org.apache.hadoop.mapred.JobConf conf, org.apache.hadoop.mapred.Reporter reporter) |
protected boolean |
isSplitable(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path fileName) |
void |
setConf(org.apache.hadoop.conf.Configuration conf) |
static void |
setGeoJsonTypesToParse(org.apache.hadoop.mapred.JobConf conf, GeoJsonParseType parseType)
Sets GeoJSON parsing type.
|
addInputPath, addInputPathRecursively, addInputPaths, computeSplitSize, getBlockIndex, getInputPathFilter, getInputPaths, getSplitHosts, getSplits, listStatus, makeSplit, makeSplit, setInputPathFilter, setInputPaths, setInputPaths, setMinSplitSize
public static void setGeoJsonTypesToParse(org.apache.hadoop.mapred.JobConf conf, GeoJsonParseType parseType)
conf
- the job configurationparseType
- the GeoJSON parsing typepublic static GeoJsonParseType getGeoJsonTypesToParse(org.apache.hadoop.mapred.JobConf conf)
conf
- the job configurationprotected boolean isSplitable(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path fileName)
isSplitable
in class org.apache.hadoop.mapred.FileInputFormat<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text>
public org.apache.hadoop.mapred.RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text> getRecordReader(org.apache.hadoop.mapred.InputSplit split, org.apache.hadoop.mapred.JobConf conf, org.apache.hadoop.mapred.Reporter reporter) throws java.io.IOException
getRecordReader
in interface org.apache.hadoop.mapred.InputFormat<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text>
getRecordReader
in class org.apache.hadoop.mapred.FileInputFormat<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text>
java.io.IOException
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