- java.lang.Object
-
- com.pervasive.datarush.operators.AbstractLogicalOperator
-
- com.pervasive.datarush.operators.StreamingOperator
-
- com.pervasive.datarush.operators.DeferredCompositeOperator
-
- com.pervasive.datarush.operators.AbstractDeferredRecordOperator
-
- com.pervasive.datarush.operators.partition.GatherHint
-
- All Implemented Interfaces:
LogicalOperator
,PipelineOperator<RecordPort>
,RecordPipelineOperator
public final class GatherHint extends AbstractDeferredRecordOperator
Forces parallel streams of data to be gathered into a single non-parallel stream. If requested, the output will also be sorted.It is also possible to force data to be staged to disk, breaking physical streaming; consumers of the output will run in a physical graph executed after the physical graph executing this operator. Even if not forced, the transition from parallel to non-parallel may cause staging to occur.
Normally these actions happens automatically in a logical graph as required, but this operator provides a mechanism for explicit control.
By definition, this is a non-parallel operator.
-
-
Field Summary
-
Fields inherited from class com.pervasive.datarush.operators.AbstractDeferredRecordOperator
input, output
-
-
Constructor Summary
Constructors Constructor Description GatherHint()
Forces a gather of parallel streams of data.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
compose(DeferredCompositionContext ctx)
Compose the body of this operator.protected void
computeMetadata(StreamingMetadataContext ctx)
Implementations must adhere to all of the contracts specified byStreamingOperator.computeMetadata(com.pervasive.datarush.operators.StreamingMetadataContext)
.DataOrdering
getDataOrdering()
Gets the data ordering of the output.boolean
isForceStaging()
Indicates whether data will be forcibly staged to disk.void
setDataOrdering(DataOrdering dataOrdering)
Sets the data ordering of the output.void
setForceStaging(boolean forceStaging)
Sets whether data must be staged to disk.-
Methods inherited from class com.pervasive.datarush.operators.AbstractDeferredRecordOperator
getInput, getOutput
-
Methods inherited from class com.pervasive.datarush.operators.DeferredCompositeOperator
computeOutputTypes
-
Methods inherited from class com.pervasive.datarush.operators.AbstractLogicalOperator
disableParallelism, getInputPorts, getOutputPorts, newInput, newInput, newOutput, newRecordInput, newRecordInput, newRecordOutput, notifyError
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.pervasive.datarush.operators.LogicalOperator
disableParallelism, getInputPorts, getOutputPorts
-
-
-
-
Method Detail
-
getDataOrdering
public DataOrdering getDataOrdering()
Gets the data ordering of the output.- Returns:
- the requested data ordering
-
setDataOrdering
public void setDataOrdering(DataOrdering dataOrdering)
Sets the data ordering of the output. The output is guaranteed to be ordered in the specified manner.- Parameters:
dataOrdering
- the requested data ordering
-
isForceStaging
public boolean isForceStaging()
Indicates whether data will be forcibly staged to disk.- Returns:
- whether staging is required
-
setForceStaging
public void setForceStaging(boolean forceStaging)
Sets whether data must be staged to disk.- Parameters:
forceStaging
- indicates whether the data must be staged
-
computeMetadata
protected void computeMetadata(StreamingMetadataContext ctx)
Description copied from class:DeferredCompositeOperator
Implementations must adhere to all of the contracts specified byStreamingOperator.computeMetadata(com.pervasive.datarush.operators.StreamingMetadataContext)
. In addition, DeferredCompositeOperators must declare required metadata so as to satisfy requirements of the operators that are added duringDeferredCompositeOperator.compose(com.pervasive.datarush.operators.DeferredCompositionContext)
.- Specified by:
computeMetadata
in classDeferredCompositeOperator
- Parameters:
ctx
- the context
-
compose
protected void compose(DeferredCompositionContext ctx)
Description copied from class:DeferredCompositeOperator
Compose the body of this operator. Implementations should do the following:- Instantiate and configure sub-operators, adding them to the provided context via
the method
OperatorComposable.add(O)
- Create necessary connections via the method
OperatorComposable.connect(P, P)
. This includes connections from the composite's input ports to sub-operators, connections between sub-operators, and connections from sub-operators output ports to the composite's output ports
- Specified by:
compose
in classDeferredCompositeOperator
- Parameters:
ctx
- the context
- Instantiate and configure sub-operators, adding them to the provided context via
the method
-
-