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, id, idCounter, 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 . |
Transformation<T> |
getInput()
Returns the input
Transformation of this FeedbackTransformation . |
Collection<Transformation<?>> |
getTransitivePredecessors()
Returns all transitive predecessor
Transformation s of this Transformation . |
Long |
getWaitTime()
Returns the wait time.
|
equals, getBufferTimeout, getCoLocationGroupKey, getId, getMaxParallelism, getMinResources, getName, getNewNodeId, getOutputType, getParallelism, getPreferredResources, getSlotSharingGroup, getUid, getUserProvidedNodeHash, hashCode, setBufferTimeout, setCoLocationGroupKey, setMaxParallelism, setName, setOutputType, setParallelism, setResources, setSlotSharingGroup, setUid, setUidHash, toString
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 Transformation<T> getInput()
Transformation
of this FeedbackTransformation
.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 Collection<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>
Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.