-
public interface CompositionIterator
Interface to be implemented by iterative operators. This is the iteration "worker". This object is purposefully separated from iterator since theexecute
method will typically build internal state that needs to be stored in an instance variable and referenced infinalComposition(com.pervasive.datarush.operators.OperatorComposable)
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
execute(IterativeExecutionContext ctx)
Executes this iterative operation.void
finalComposition(OperatorComposable ctx)
Called after execute is called.
-
-
-
Method Detail
-
execute
void execute(IterativeExecutionContext ctx)
Executes this iterative operation. From the context, the operation will typically create one or more subgraphs and execute them. Within the subgraphs, an iterator can reference its input ports (which automatically reference the staged dataset that was created by the framework for iteration).- Parameters:
ctx
- context that provides a way to create subgraphs
-
finalComposition
void finalComposition(OperatorComposable ctx)
Called after execute is called. Implementations of this method must create connections to each of the IterativeOperator's output ports. Implementations also still have access to the IterativeOperator's input ports if needed. Generally iterators will produce a single (PMML) model in their execute method, so the implementation of this method will consist of the following://wire the model that we generated in
execute
to the output port PutPMML put= ctx.add(new PutPMML(model)); ctx.connect(put.getOutput(),output);- Parameters:
ctx
- the context to which the iterator should add operators and connections
-
-