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
IOExceptionprotected UnenclosedBaseJsonRecordReader(org.apache.hadoop.mapred.InputSplit split,
org.apache.hadoop.conf.Configuration conf)
throws IOException
IOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose 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>IOExceptionpublic 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>IOExceptionInterruptedExceptionpublic 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>IOExceptionInterruptedExceptionpublic long getPos()
throws IOException
getPos in interface org.apache.hadoop.mapred.RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text>IOExceptionpublic 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>IOExceptionpublic 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>IOExceptionInterruptedExceptionpublic 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>IOExceptionpublic boolean nextKeyValue()
throws IOException,
InterruptedException
nextKeyValue in class org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text>IOExceptionInterruptedExceptionprotected int getChar()
throws IOException
IOExceptionprotected int getNonWhite()
throws IOException
IOExceptionprotected abstract boolean moveToRecordStart()
throws IOException
IOExceptionCopyright © 2024 The Apache Software Foundation. All rights reserved.