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 Class<V> |
clazz |
protected DataInputStream |
din |
protected LinkedBlockingQueue<LlapBaseRecordReader.ReaderEvent> |
readerEvents |
protected Thread |
readerThread |
protected Schema |
schema |
protected long |
timeout |
Constructor and Description |
---|
LlapBaseRecordReader(InputStream in,
Schema schema,
Class<V> clazz,
org.apache.hadoop.mapred.JobConf job) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
org.apache.hadoop.io.NullWritable |
createKey() |
V |
createValue() |
long |
getPos() |
float |
getProgress() |
protected LlapBaseRecordReader.ReaderEvent |
getReaderEvent() |
protected Thread |
getReaderThread() |
Schema |
getSchema() |
void |
handleEvent(LlapBaseRecordReader.ReaderEvent event) |
boolean |
next(org.apache.hadoop.io.NullWritable key,
V value) |
protected void |
setReaderThread(Thread readerThread) |
protected final DataInputStream din
protected final Schema schema
protected Thread readerThread
protected final LinkedBlockingQueue<LlapBaseRecordReader.ReaderEvent> readerEvents
protected final long timeout
public LlapBaseRecordReader(InputStream in, Schema schema, Class<V> clazz, org.apache.hadoop.mapred.JobConf job)
public Schema getSchema()
public void close() throws IOException
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
public void handleEvent(LlapBaseRecordReader.ReaderEvent event)
protected LlapBaseRecordReader.ReaderEvent getReaderEvent() throws IOException
IOException
protected void setReaderThread(Thread readerThread)
protected Thread getReaderThread()
Copyright © 2016 The Apache Software Foundation. All rights reserved.