public interface CompositionIterator
Interface to be implemented by iterative operators. This is
the iteration "worker". This object is purposefully separated from
iterator since the
execute method will typically build internal state
that needs to be stored in an instance variable and referenced in finalComposition(com.pervasive.datarush.operators.OperatorComposable).-
Method Summary
Modifier and TypeMethodDescriptionvoidExecutes this iterative operation.voidCalled after execute is called.
-
Method Details
-
execute
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
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 inexecuteto 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
-