T
- the type of the model objectpublic class GetModel<T> extends ExecutableOperator implements SinkOperator<AbstractModelPort<T>>
mergeHandler
must be specified.
NOTE: this operator is non-parallel
Constructor and Description |
---|
GetModel(LogicalPortFactory<? extends AbstractModelPort<T>> factory)
Gets a model from a graph.
|
Modifier and Type | Method and Description |
---|---|
protected ExecutableOperator |
cloneForExecution()
Performs a deep copy of the operator for execution.
|
protected void |
computeMetadata(StreamingMetadataContext ctx)
Implementations must adhere to the following contracts
|
protected void |
execute(ExecutionContext ctx)
Executes the operator.
|
AbstractModelPort<T> |
getInput()
The input port
|
ModelMergeHandler<T> |
getMergeHandler()
Returns the merge handler to be used to merge model fragments into a single model.
|
T |
getModel()
Following graph execution, will return an in-memory model object.
|
Reference<T> |
getModelReference()
For advanced use only; returns the reference location where the model is to be set.
|
void |
setMergeHandler(ModelMergeHandler<T> mergeHandler)
Sets the merge handler to be used to merge model fragments into a single model.
|
void |
setModelReference(Reference<T> reference)
For advanced use only; specifies a reference location where the model is to be set.
|
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 GetModel(LogicalPortFactory<? extends AbstractModelPort<T>> factory)
factory
- the factory for the model port.public final AbstractModelPort<T> getInput()
getInput
in interface SinkOperator<AbstractModelPort<T>>
public final T getModel()
public final Reference<T> getModelReference()
public final void setModelReference(Reference<T> reference)
reference
- the reference locationpublic final ModelMergeHandler<T> getMergeHandler()
public final void setMergeHandler(ModelMergeHandler<T> mergeHandler)
mergeHandler
- the merge handler to useprotected final 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 final ExecutableOperator cloneForExecution()
ExecutableOperator
cloneForExecution
in class ExecutableOperator
protected final void execute(ExecutionContext ctx)
ExecutableOperator
execute
in class ExecutableOperator
ctx
- context in which to lookup physical ports bound to logical portsCopyright © 2016 Actian Corporation. All rights reserved.