T
- The type of the input elements and the feedback elements.@Internal public class FeedbackTransformation<T> extends Transformation<T>
This is different from how iterations work in batch processing. Once a feedback point is
defined you can connect one or several Transformations
as 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
Transformations
must match the parallelism of the input Transformation
.
The type of the input Transformation
and the feedback Transformation
must
match.
bufferTimeout, description, id, name, outputType, typeUsed, UPPER_BOUND_MAX_PARALLELISM
Constructor and Description |
---|
FeedbackTransformation(Transformation<T> input,
Long waitTime)
Creates a new
FeedbackTransformation from the given input. |
Modifier and Type | Method and Description |
---|---|
void |
addFeedbackEdge(Transformation<T> transform)
Adds a feedback edge.
|
List<Transformation<T>> |
getFeedbackEdges()
Returns the list of feedback
Transformations . |
List<Transformation<?>> |
getInputs()
Returns the
transformations that are the immediate predecessors of the
current transformation in the transformation graph. |
List<Transformation<?>> |
getTransitivePredecessors()
Returns all transitive predecessor
Transformation s of this Transformation . |
Long |
getWaitTime()
Returns the wait time.
|
declareManagedMemoryUseCaseAtOperatorScope, declareManagedMemoryUseCaseAtSlotScope, equals, getBufferTimeout, getCoLocationGroupKey, getDescription, getId, getManagedMemoryOperatorScopeUseCaseWeights, getManagedMemorySlotScopeUseCases, getMaxParallelism, getMinResources, getName, getNewNodeId, getOutputType, getParallelism, getPreferredResources, getSlotSharingGroup, getUid, getUserProvidedNodeHash, hashCode, isParallelismConfigured, setBufferTimeout, setCoLocationGroupKey, setDescription, setMaxParallelism, setName, setOutputType, setParallelism, setParallelism, setResources, setSlotSharingGroup, setSlotSharingGroup, setUid, setUidHash, toString, updateManagedMemoryStateBackendUseCase
public FeedbackTransformation(Transformation<T> input, Long waitTime)
FeedbackTransformation
from the given input.input
- The input Transformation
waitTime
- The wait time of the feedback operator. After the time expires the operation
will close and not receive any more feedback elements.public void addFeedbackEdge(Transformation<T> transform)
Transformation
must match the
parallelism of the input Transformation
of this FeedbackTransformation
transform
- The new feedback Transformation
.public List<Transformation<T>> getFeedbackEdges()
Transformations
.public Long getWaitTime()
public List<Transformation<?>> getTransitivePredecessors()
Transformation
Transformation
s of this Transformation
.
This is, for example, used when determining whether a feedback edge of an iteration actually
has the iteration head as a predecessor.getTransitivePredecessors
in class Transformation<T>
public List<Transformation<?>> getInputs()
Transformation
transformations
that are the immediate predecessors of the
current transformation in the transformation graph.getInputs
in class Transformation<T>
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.