public class LlapBaseRecordReader<V extends org.apache.hadoop.io.WritableComparable> extends Object implements org.apache.hadoop.mapred.RecordReader<org.apache.hadoop.io.NullWritable,V>
Modifier and Type | Class and Description |
---|---|
static class |
LlapBaseRecordReader.ReaderEvent
Define success/error events which are passed to the reader from a different thread.
|
Modifier and Type | Field and Description |
---|---|
protected ChunkedInputStream |
cin |
protected Class<V> |
clazz |
protected Closeable |
client |
protected DataInputStream |
din |
protected LinkedBlockingQueue<LlapBaseRecordReader.ReaderEvent> |
readerEvents |
protected Thread |
readerThread |
protected Schema |
schema |
Constructor and Description |
---|
LlapBaseRecordReader(InputStream in,
Schema schema,
Class<V> clazz,
org.apache.hadoop.mapred.JobConf job,
Closeable client,
Closeable socket) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
org.apache.hadoop.io.NullWritable |
createKey() |
V |
createValue() |
protected void |
failOnInterruption(IOException io) |
long |
getPos() |
float |
getProgress() |
protected LlapBaseRecordReader.ReaderEvent |
getReaderEvent() |
protected Thread |
getReaderThread() |
Schema |
getSchema() |
void |
handleEvent(LlapBaseRecordReader.ReaderEvent event) |
protected boolean |
hasInput() |
boolean |
next(org.apache.hadoop.io.NullWritable key,
V value) |
protected void |
processReaderEvent() |
protected void |
setReaderThread(Thread readerThread) |
protected final ChunkedInputStream cin
protected final DataInputStream din
protected final Schema schema
protected Thread readerThread
protected final LinkedBlockingQueue<LlapBaseRecordReader.ReaderEvent> readerEvents
protected final Closeable client
public Schema getSchema()
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.NullWritable,V extends org.apache.hadoop.io.WritableComparable>
IOException
public long getPos()
getPos
in interface org.apache.hadoop.mapred.RecordReader<org.apache.hadoop.io.NullWritable,V extends org.apache.hadoop.io.WritableComparable>
public float getProgress()
getProgress
in interface org.apache.hadoop.mapred.RecordReader<org.apache.hadoop.io.NullWritable,V extends org.apache.hadoop.io.WritableComparable>
public org.apache.hadoop.io.NullWritable createKey()
createKey
in interface org.apache.hadoop.mapred.RecordReader<org.apache.hadoop.io.NullWritable,V extends org.apache.hadoop.io.WritableComparable>
public V createValue()
createValue
in interface org.apache.hadoop.mapred.RecordReader<org.apache.hadoop.io.NullWritable,V extends org.apache.hadoop.io.WritableComparable>
public boolean next(org.apache.hadoop.io.NullWritable key, V value) throws IOException
next
in interface org.apache.hadoop.mapred.RecordReader<org.apache.hadoop.io.NullWritable,V extends org.apache.hadoop.io.WritableComparable>
IOException
protected void processReaderEvent() throws IOException
IOException
protected void failOnInterruption(IOException io) throws IOException
IOException
public void handleEvent(LlapBaseRecordReader.ReaderEvent event)
protected boolean hasInput() throws IOException
IOException
protected LlapBaseRecordReader.ReaderEvent getReaderEvent() throws IOException
IOException
protected void setReaderThread(Thread readerThread)
protected Thread getReaderThread()
Copyright © 2022 The Apache Software Foundation. All rights reserved.