Class BulkIterationBase<T>
- java.lang.Object
-
- org.apache.flink.api.common.operators.Operator<OUT>
-
- org.apache.flink.api.common.operators.AbstractUdfOperator<OUT,FT>
-
- org.apache.flink.api.common.operators.SingleInputOperator<T,T,AbstractRichFunction>
-
- org.apache.flink.api.common.operators.base.BulkIterationBase<T>
-
- All Implemented Interfaces:
IterationOperator
,Visitable<Operator<?>>
@Internal public class BulkIterationBase<T> extends SingleInputOperator<T,T,AbstractRichFunction> implements IterationOperator
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
BulkIterationBase.PartialSolutionPlaceHolder<OT>
Specialized operator to use as a recognizable place-holder for the input to the step function when composing the nested data flow.static class
BulkIterationBase.TerminationCriterionAggregationConvergence
Convergence for the termination criterion is reached if no tuple is output at current iteration for the termination criterion branchstatic class
BulkIterationBase.TerminationCriterionAggregator
Aggregator that basically only adds 1 for every output tuple of the termination criterion branchstatic class
BulkIterationBase.TerminationCriterionMapper<X>
Special Mapper that is added before a termination criterion and is only a container for an special aggregator
-
Field Summary
Fields Modifier and Type Field Description static String
TERMINATION_CRITERION_AGGREGATOR_NAME
protected Operator<?>
terminationCriterion
-
Fields inherited from class org.apache.flink.api.common.operators.SingleInputOperator
input
-
Fields inherited from class org.apache.flink.api.common.operators.AbstractUdfOperator
broadcastInputs, userFunction
-
Fields inherited from class org.apache.flink.api.common.operators.Operator
compilerHints, name, operatorInfo, parameters
-
-
Constructor Summary
Constructors Constructor Description BulkIterationBase(UnaryOperatorInformation<T,T> operatorInfo)
BulkIterationBase(UnaryOperatorInformation<T,T> operatorInfo, String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected List<T>
executeOnCollections(List<T> inputData, RuntimeContext runtimeContext, ExecutionConfig executionConfig)
AggregatorRegistry
getAggregators()
Map<String,Operator<?>>
getBroadcastInputs()
The BulkIteration meta operator cannot have broadcast inputs.int
getMaximumNumberOfIterations()
Operator<T>
getNextPartialSolution()
Operator<T>
getPartialSolution()
Operator<?>
getTerminationCriterion()
void
setBroadcastVariable(String name, Operator<?> root)
The BulkIteration meta operator cannot have broadcast inputs.<X> void
setBroadcastVariables(Map<String,Operator<X>> inputs)
The BulkIteration meta operator cannot have broadcast inputs.void
setMaximumNumberOfIterations(int num)
void
setNextPartialSolution(Operator<T> result)
<X> void
setTerminationCriterion(Operator<X> criterion)
void
validate()
-
Methods inherited from class org.apache.flink.api.common.operators.SingleInputOperator
accept, clearInputs, getInput, getKeyColumns, getNumberOfInputs, getOperatorInfo, getSemanticProperties, setInput, setSemanticProperties
-
Methods inherited from class org.apache.flink.api.common.operators.AbstractUdfOperator
asArray, emptyClassArray, getUserCodeWrapper
-
Methods inherited from class org.apache.flink.api.common.operators.Operator
createUnionCascade, createUnionCascade, createUnionCascade, getCompilerHints, getMinResources, getName, getParallelism, getParameters, getPreferredResources, setName, setParallelism, setParameter, setResources, toString
-
-
-
-
Field Detail
-
TERMINATION_CRITERION_AGGREGATOR_NAME
public static final String TERMINATION_CRITERION_AGGREGATOR_NAME
- See Also:
- Constant Field Values
-
terminationCriterion
protected Operator<?> terminationCriterion
-
-
Constructor Detail
-
BulkIterationBase
public BulkIterationBase(UnaryOperatorInformation<T,T> operatorInfo)
-
BulkIterationBase
public BulkIterationBase(UnaryOperatorInformation<T,T> operatorInfo, String name)
- Parameters:
name
-
-
-
Method Detail
-
getPartialSolution
public Operator<T> getPartialSolution()
- Returns:
- The operator representing the partial solution.
-
getNextPartialSolution
public Operator<T> getNextPartialSolution()
- Returns:
- The operator representing the next partial solution.
-
getTerminationCriterion
public Operator<?> getTerminationCriterion()
- Returns:
- The operator representing the termination criterion.
-
setTerminationCriterion
public <X> void setTerminationCriterion(Operator<X> criterion)
- Parameters:
criterion
-
-
setMaximumNumberOfIterations
public void setMaximumNumberOfIterations(int num)
- Parameters:
num
-
-
getMaximumNumberOfIterations
public int getMaximumNumberOfIterations()
-
getAggregators
public AggregatorRegistry getAggregators()
- Specified by:
getAggregators
in interfaceIterationOperator
-
validate
public void validate() throws InvalidProgramException
- Throws:
InvalidProgramException
-
getBroadcastInputs
public Map<String,Operator<?>> getBroadcastInputs()
The BulkIteration meta operator cannot have broadcast inputs.- Overrides:
getBroadcastInputs
in classAbstractUdfOperator<T,AbstractRichFunction>
- Returns:
- An empty map.
-
setBroadcastVariable
public void setBroadcastVariable(String name, Operator<?> root)
The BulkIteration meta operator cannot have broadcast inputs. This method always throws an exception.- Overrides:
setBroadcastVariable
in classAbstractUdfOperator<T,AbstractRichFunction>
- Parameters:
name
- Ignored.root
- Ignored.
-
setBroadcastVariables
public <X> void setBroadcastVariables(Map<String,Operator<X>> inputs)
The BulkIteration meta operator cannot have broadcast inputs. This method always throws an exception.- Overrides:
setBroadcastVariables
in classAbstractUdfOperator<T,AbstractRichFunction>
- Parameters:
inputs
- Ignored
-
executeOnCollections
protected List<T> executeOnCollections(List<T> inputData, RuntimeContext runtimeContext, ExecutionConfig executionConfig)
- Specified by:
executeOnCollections
in classSingleInputOperator<T,T,AbstractRichFunction>
-
-