Class CoFeedbackTransformation<F>
- java.lang.Object
-
- org.apache.flink.api.dag.Transformation<F>
-
- org.apache.flink.streaming.api.transformations.CoFeedbackTransformation<F>
-
- Type Parameters:
F- The type of the feedback elements.
@Internal public class CoFeedbackTransformation<F> extends org.apache.flink.api.dag.Transformation<F>This represents a feedback point in a topology. The type of the feedback elements need not match the type of the upstreamTransformationbecause the only allowed operations after aCoFeedbackTransformationareTwoInputTransformations. The upstreamTransformationwill be connected to the first input of the Co-Transform while the feedback edges will be connected to the second input.Both the partitioning of the input and the feedback edges is preserved. They can also have differing partitioning strategies. This requires, however, that the parallelism of the feedback
Transformationsmust match the parallelism of the inputTransformation.The upstream
Transformationis not wired to thisCoFeedbackTransformation. It is instead directly wired to theTwoInputTransformationafter thisCoFeedbackTransformation.This is different from Iterations in batch processing.
- See Also:
FeedbackTransformation
-
-
Constructor Summary
Constructors Constructor Description CoFeedbackTransformation(int parallelism, org.apache.flink.api.common.typeinfo.TypeInformation<F> feedbackType, Long waitTime)Creates a newCoFeedbackTransformationfrom the given input.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddFeedbackEdge(org.apache.flink.api.dag.Transformation<F> transform)Adds a feedback edge.List<org.apache.flink.api.dag.Transformation<F>>getFeedbackEdges()Returns the list of feedbackTransformations.List<org.apache.flink.api.dag.Transformation<?>>getInputs()protected List<org.apache.flink.api.dag.Transformation<?>>getTransitivePredecessorsInternal()LonggetWaitTime()Returns the wait time.-
Methods inherited from class org.apache.flink.api.dag.Transformation
declareManagedMemoryUseCaseAtOperatorScope, declareManagedMemoryUseCaseAtSlotScope, equals, getAttribute, getBufferTimeout, getCoLocationGroupKey, getDescription, getId, getManagedMemoryOperatorScopeUseCaseWeights, getManagedMemorySlotScopeUseCases, getMaxParallelism, getMinResources, getName, getNewNodeId, getOutputType, getParallelism, getPreferredResources, getSlotSharingGroup, getTransitivePredecessors, getUid, getUserProvidedNodeHash, hashCode, isParallelismConfigured, setAttribute, setBufferTimeout, setCoLocationGroupKey, setDescription, setMaxParallelism, setName, setOutputType, setParallelism, setParallelism, setResources, setSlotSharingGroup, setSlotSharingGroup, setUid, setUidHash, toString, updateManagedMemoryStateBackendUseCase
-
-
-
-
Constructor Detail
-
CoFeedbackTransformation
public CoFeedbackTransformation(int parallelism, org.apache.flink.api.common.typeinfo.TypeInformation<F> feedbackType, Long waitTime)Creates a newCoFeedbackTransformationfrom the given input.- Parameters:
parallelism- The parallelism of the upstreamTransformationand the feedback edges.feedbackType- The type of the feedback edgeswaitTime- The wait time of the feedback operator. After the time expires the operation will close and not receive any more feedback elements.
-
-
Method Detail
-
addFeedbackEdge
public void addFeedbackEdge(org.apache.flink.api.dag.Transformation<F> transform)
Adds a feedback edge. The parallelism of theTransformationmust match the parallelism of the inputTransformationof the upstreamTransformation.- Parameters:
transform- The new feedbackTransformation.
-
getFeedbackEdges
public List<org.apache.flink.api.dag.Transformation<F>> getFeedbackEdges()
Returns the list of feedbackTransformations.
-
getWaitTime
public Long getWaitTime()
Returns the wait time. This is the amount of time that the feedback operator keeps listening for feedback elements. Once the time expires the operation will close and will not receive further elements.
-
getTransitivePredecessorsInternal
protected List<org.apache.flink.api.dag.Transformation<?>> getTransitivePredecessorsInternal()
- Specified by:
getTransitivePredecessorsInternalin classorg.apache.flink.api.dag.Transformation<F>
-
-