public class GeoJsonRecordReader
extends <any>
RecordReader
for GeoJSON text files. Multi-line JSON is supported. 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 |
---|
GeoJsonRecordReader(GeoJsonParseType parseType)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
LongWritable |
getCurrentKey() |
Text |
getCurrentValue() |
long |
getPos() |
float |
getProgress() |
void |
initialize(InputSplit isplit, TaskAttemptContext context) |
boolean |
nextKeyValue() |
public GeoJsonRecordReader(GeoJsonParseType parseType)
parseType
- the GeoJSON parsing typepublic void close() throws java.io.IOException
java.io.IOException
public LongWritable getCurrentKey() throws java.io.IOException, java.lang.InterruptedException
java.io.IOException
java.lang.InterruptedException
public Text getCurrentValue() throws java.io.IOException, java.lang.InterruptedException
java.io.IOException
java.lang.InterruptedException
public long getPos() throws java.io.IOException
java.io.IOException
public float getProgress() throws java.io.IOException
java.io.IOException
public void initialize(InputSplit isplit, TaskAttemptContext context) throws java.io.IOException, java.lang.InterruptedException
java.io.IOException
java.lang.InterruptedException
public boolean nextKeyValue() throws java.io.IOException, java.lang.InterruptedException
java.io.IOException
java.lang.InterruptedException
Copyright © 2017 Oracle and/or its affiliates. All Rights Reserved.