Package org.apache.druid.query.operator
Class AbstractPartitioningOperator.AbstractReceiver
- java.lang.Object
-
- org.apache.druid.query.operator.AbstractPartitioningOperator.AbstractReceiver
-
- All Implemented Interfaces:
Operator.Receiver
- Enclosing class:
- AbstractPartitioningOperator
protected abstract static class AbstractPartitioningOperator.AbstractReceiver extends Object implements Operator.Receiver
-
-
Field Summary
Fields Modifier and Type Field Description protected Operator.Receiverdelegateprotected AtomicReference<Iterator<RowsAndColumns>>iterHolderprotected List<String>partitionColumns
-
Constructor Summary
Constructors Constructor Description AbstractReceiver(Operator.Receiver delegate, AtomicReference<Iterator<RowsAndColumns>> iterHolder, List<String> partitionColumns)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidcompleted()Used to indicate that no more data will ever come.protected abstract Iterator<RowsAndColumns>getIteratorForRAC(RowsAndColumns rac)Operator.Signalpush(RowsAndColumns rac)Used to push data.protected Operator.SignalpushPartition(RowsAndColumns partition, boolean isLastPartition, Operator.Signal previousSignal)
-
-
-
Field Detail
-
delegate
protected final Operator.Receiver delegate
-
iterHolder
protected final AtomicReference<Iterator<RowsAndColumns>> iterHolder
-
-
Constructor Detail
-
AbstractReceiver
public AbstractReceiver(Operator.Receiver delegate, AtomicReference<Iterator<RowsAndColumns>> iterHolder, List<String> partitionColumns)
-
-
Method Detail
-
push
public Operator.Signal push(RowsAndColumns rac)
Description copied from interface:Operator.ReceiverUsed to push data. Return value indicates if more data will be accepted. If false, push should not be called anymore. If push is called after it returned false, undefined things will happen.- Specified by:
pushin interfaceOperator.Receiver- Parameters:
rac-RowsAndColumnsof data- Returns:
- a boolean value indicating if more data will be accepted. If false, push should never be called anymore
-
completed
public void completed()
Description copied from interface:Operator.ReceiverUsed to indicate that no more data will ever come. This is only used during the happy path and is not equivalent to aCloseable.close()method. Namely, there is no guarantee that this method will be called if execution halts due to an exception from push.It is acceptable for an implementation to eagerly close resources from this method, but it is not acceptable for this method to be the sole method of managing the lifecycle of resources held by the Operator.
- Specified by:
completedin interfaceOperator.Receiver
-
pushPartition
protected Operator.Signal pushPartition(RowsAndColumns partition, boolean isLastPartition, Operator.Signal previousSignal)
-
getIteratorForRAC
protected abstract Iterator<RowsAndColumns> getIteratorForRAC(RowsAndColumns rac)
-
-