public class MergeFields extends ExecutableOperator implements RecordSourceOperator
TypeUtil.merge(RecordTokenType...)
for more details on the resolution mechanism.
This operator is non-parallel, as the equivalence of input sizes
cannot be guaranteed in a parallel context; using this operator will force
a gather of the input to a single machine.
Even then, care must be taken to ensure the ordering of input records
is consistent with the desired result. Generally, this operator only
makes sense when used inside a DeferredCompositeOperator
where
these guarantees can be made.
Constructor and Description |
---|
MergeFields() |
Modifier and Type | Method and Description |
---|---|
protected void |
computeMetadata(StreamingMetadataContext ctx)
Implementations must adhere to the following contracts
|
protected void |
execute(ExecutionContext ctx)
Executes the operator.
|
RecordPort |
getLeftInput()
Gets the record port providing the "left" input for the merge.
|
RecordPort |
getOutput()
Gets the record port providing the resulting merged records.
|
RecordPort |
getRightInput()
Gets the record port providing the "right" input for the merge.
|
cloneForExecution, getNumInputCopies, getPortSettings, handleInactiveOutput
disableParallelism, getInputPorts, getOutputPorts, newInput, newInput, newOutput, newRecordInput, newRecordInput, newRecordOutput, notifyError
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
disableParallelism, getInputPorts, getOutputPorts
public RecordPort getLeftInput()
public RecordPort getRightInput()
public RecordPort getOutput()
getOutput
in interface RecordSourceOperator
getOutput
in interface SourceOperator<RecordPort>
protected void computeMetadata(StreamingMetadataContext ctx)
StreamingOperator
StreamingMetadataContext.parallelize(ParallelismStrategy)
.
RecordPort#setRequiredDataOrdering
, otherwise data may arrive in any order.
RecordPort#setRequiredDataDistribution
, otherwise data will arrive in an unspecified partial distribution
.
RecordPort#getSourceDataDistribution
and RecordPort#getSourceDataOrdering
. These should be
viewed as a hints to help chose a more efficient algorithm. In such cases, though, operators must
still declare data ordering and data distribution requirements; otherwise there is no guarantee that
data will arrive sorted/distributed as required.
RecordPort#setType
.RecordPort#setOutputDataOrdering
RecordPort#setOutputDataDistribution
AbstractModelPort#setMergeHandler
.MergeModel
is a convenient, re-usable model reducer, parameterized with
a merge-handler.
SimpleModelPort
's have no associated metadata and therefore there is
never any output metadata to declare. PMMLPort
's, on the other hand,
do have associated metadata. For all PMMLPorts, implementations must declare
the following:
PMMLPort.setPMMLModelSpec
.
computeMetadata
in class StreamingOperator
ctx
- the contextprotected void execute(ExecutionContext ctx)
ExecutableOperator
execute
in class ExecutableOperator
ctx
- context in which to lookup physical ports bound to logical portsCopyright © 2020 Actian Corporation. All rights reserved.