Class FeedbackTransformation<T>
- java.lang.Object
-
- org.apache.flink.api.dag.Transformation<T>
-
- org.apache.flink.streaming.api.transformations.FeedbackTransformation<T>
-
- Type Parameters:
T- The type of the input elements and the feedback elements.
@Internal public class FeedbackTransformation<T> extends org.apache.flink.api.dag.Transformation<T>This represents a feedback point in a topology.This is different from how iterations work in batch processing. Once a feedback point is defined you can connect one or several
Transformationsas a feedback edges. Operations downstream from the feedback point will receive elements from the input of this feedback point and from the feedback edges.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 type of the input
Transformationand the feedbackTransformationmust match.
-
-
Constructor Summary
Constructors Constructor Description FeedbackTransformation(org.apache.flink.api.dag.Transformation<T> input, Long waitTime)Creates a newFeedbackTransformationfrom the given input.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddFeedbackEdge(org.apache.flink.api.dag.Transformation<T> transform)Adds a feedback edge.List<org.apache.flink.api.dag.Transformation<T>>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
-
FeedbackTransformation
public FeedbackTransformation(org.apache.flink.api.dag.Transformation<T> input, Long waitTime)
Creates a newFeedbackTransformationfrom the given input.- Parameters:
input- The inputTransformationwaitTime- 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<T> transform)
Adds a feedback edge. The parallelism of theTransformationmust match the parallelism of the inputTransformationof thisFeedbackTransformation- Parameters:
transform- The new feedbackTransformation.
-
getFeedbackEdges
public List<org.apache.flink.api.dag.Transformation<T>> 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<T>
-
-