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 Closeableclose in interface AutoCloseableclose in interface org.apache.hadoop.mapred.RecordReader<org.apache.hadoop.io.NullWritable,V extends org.apache.hadoop.io.WritableComparable>IOExceptionpublic 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>IOExceptionprotected void processReaderEvent()
throws IOException
IOExceptionprotected void failOnInterruption(IOException io) throws IOException
IOExceptionpublic void handleEvent(LlapBaseRecordReader.ReaderEvent event)
protected boolean hasInput()
throws IOException
IOExceptionprotected LlapBaseRecordReader.ReaderEvent getReaderEvent() throws IOException
IOExceptionprotected void setReaderThread(Thread readerThread)
protected Thread getReaderThread()
Copyright © 2019 The Apache Software Foundation. All Rights Reserved.