public abstract class UnenclosedBaseJsonRecordReader
extends org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text>
implements org.apache.hadoop.mapred.RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text>
Modifier and Type | Field and Description |
---|---|
protected long |
end |
protected boolean |
firstBraceConsumed |
protected BufferedReader |
inputReader |
protected org.apache.hadoop.io.LongWritable |
mkey |
protected org.apache.hadoop.io.Text |
mval |
protected long |
readerPosition |
protected long |
start |
Modifier | Constructor and Description |
---|---|
protected |
UnenclosedBaseJsonRecordReader() |
protected |
UnenclosedBaseJsonRecordReader(org.apache.hadoop.mapred.InputSplit split,
org.apache.hadoop.conf.Configuration conf) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
org.apache.hadoop.io.LongWritable |
createKey() |
org.apache.hadoop.io.Text |
createValue() |
protected int |
getChar() |
org.apache.hadoop.io.LongWritable |
getCurrentKey() |
org.apache.hadoop.io.Text |
getCurrentValue() |
protected int |
getNonWhite() |
long |
getPos() |
float |
getProgress() |
void |
initialize(org.apache.hadoop.mapreduce.InputSplit split,
org.apache.hadoop.mapreduce.TaskAttemptContext taskContext) |
protected abstract boolean |
moveToRecordStart()
Given an arbitrary byte offset into an unenclosed JSON document,
find the start of the next record in the document.
|
boolean |
next(org.apache.hadoop.io.LongWritable key,
org.apache.hadoop.io.Text value) |
boolean |
nextKeyValue() |
protected BufferedReader inputReader
protected org.apache.hadoop.io.LongWritable mkey
protected org.apache.hadoop.io.Text mval
protected long readerPosition
protected long start
protected long end
protected boolean firstBraceConsumed
protected UnenclosedBaseJsonRecordReader() throws IOException
IOException
protected UnenclosedBaseJsonRecordReader(org.apache.hadoop.mapred.InputSplit split, org.apache.hadoop.conf.Configuration conf) throws IOException
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in interface org.apache.hadoop.mapred.RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text>
close
in class org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text>
IOException
public org.apache.hadoop.io.LongWritable createKey()
createKey
in interface org.apache.hadoop.mapred.RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text>
public org.apache.hadoop.io.Text createValue()
createValue
in interface org.apache.hadoop.mapred.RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text>
public org.apache.hadoop.io.LongWritable getCurrentKey() throws IOException, InterruptedException
getCurrentKey
in class org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text>
IOException
InterruptedException
public org.apache.hadoop.io.Text getCurrentValue() throws IOException, InterruptedException
getCurrentValue
in class org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text>
IOException
InterruptedException
public long getPos() throws IOException
getPos
in interface org.apache.hadoop.mapred.RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text>
IOException
public float getProgress() throws IOException
getProgress
in interface org.apache.hadoop.mapred.RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text>
getProgress
in class org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text>
IOException
public void initialize(org.apache.hadoop.mapreduce.InputSplit split, org.apache.hadoop.mapreduce.TaskAttemptContext taskContext) throws IOException, InterruptedException
initialize
in class org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text>
IOException
InterruptedException
public boolean next(org.apache.hadoop.io.LongWritable key, org.apache.hadoop.io.Text value) throws IOException
next
in interface org.apache.hadoop.mapred.RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text>
IOException
public boolean nextKeyValue() throws IOException, InterruptedException
nextKeyValue
in class org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text>
IOException
InterruptedException
protected int getChar() throws IOException
IOException
protected int getNonWhite() throws IOException
IOException
protected abstract boolean moveToRecordStart() throws IOException
IOException
Copyright © 2024. All rights reserved.