public abstract class EncodedDataConsumer<BatchKey,BatchType extends org.apache.hadoop.hive.common.io.encoded.EncodedColumnBatch<BatchKey>> extends Object implements Consumer<BatchType>, ReadPipeline
| Modifier and Type | Field and Description |
|---|---|
protected FixedSizedObjectPool<ColumnVectorBatch> |
cvbPool |
| Constructor and Description |
|---|
EncodedDataConsumer(Consumer<ColumnVectorBatch> consumer,
int colCount,
LlapDaemonIOMetrics ioMetrics) |
| Modifier and Type | Method and Description |
|---|---|
void |
consumeData(BatchType data)
Some data has been produced.
|
protected abstract void |
decodeBatch(BatchType batch,
Consumer<ColumnVectorBatch> downstreamConsumer) |
Callable<Void> |
getReadCallable() |
void |
init(ConsumerFeedback<BatchType> upstreamFeedback,
Callable<Void> readCallable) |
void |
pause()
Pause data production.
|
void |
returnData(ColumnVectorBatch data)
Returns processed data back to producer; necessary if e.g.
|
void |
setDone()
No more data will be produced; done.
|
void |
setError(Throwable t)
No more data will be produced; error during production.
|
void |
stop()
Stop data production, the external operation has been cancelled.
|
void |
unpause()
Unpause data production.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetSchemaEvolutionprotected final FixedSizedObjectPool<ColumnVectorBatch> cvbPool
public EncodedDataConsumer(Consumer<ColumnVectorBatch> consumer, int colCount, LlapDaemonIOMetrics ioMetrics)
public void init(ConsumerFeedback<BatchType> upstreamFeedback, Callable<Void> readCallable)
public Callable<Void> getReadCallable()
getReadCallable in interface ReadPipelinepublic void consumeData(BatchType data) throws InterruptedException
ConsumerconsumeData in interface Consumer<BatchType extends org.apache.hadoop.hive.common.io.encoded.EncodedColumnBatch<BatchKey>>InterruptedExceptionprotected abstract void decodeBatch(BatchType batch, Consumer<ColumnVectorBatch> downstreamConsumer) throws InterruptedException
InterruptedExceptionpublic void setDone()
throws InterruptedException
ConsumersetDone in interface Consumer<BatchType extends org.apache.hadoop.hive.common.io.encoded.EncodedColumnBatch<BatchKey>>InterruptedExceptionpublic void setError(Throwable t) throws InterruptedException
ConsumersetError in interface Consumer<BatchType extends org.apache.hadoop.hive.common.io.encoded.EncodedColumnBatch<BatchKey>>InterruptedExceptionpublic void returnData(ColumnVectorBatch data)
ConsumerFeedbackreturnData in interface ConsumerFeedback<ColumnVectorBatch>public void stop()
ConsumerFeedbackstop in interface ConsumerFeedback<ColumnVectorBatch>public void pause()
ConsumerFeedbackpause in interface ConsumerFeedback<ColumnVectorBatch>public void unpause()
ConsumerFeedbackunpause in interface ConsumerFeedback<ColumnVectorBatch>Copyright © 2019 The Apache Software Foundation. All Rights Reserved.