F
- The type of the feedback elements.@Internal public class CoFeedbackTransformation<F> extends StreamTransformation<F>
StreamTransformation
because the only allowed operations
after a CoFeedbackTransformation
are
TwoInputTransformations
.
The upstream StreamTransformation
will 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
StreamTransformations
must match the parallelism of the input
StreamTransformation
.
The upstream StreamTransformation
is not wired to this CoFeedbackTransformation
.
It is instead directly wired to the TwoInputTransformation
after this
CoFeedbackTransformation
.
This is different from Iterations in batch processing.
FeedbackTransformation
bufferTimeout, id, idCounter, name, outputType, typeUsed
Constructor and Description |
---|
CoFeedbackTransformation(int parallelism,
TypeInformation<F> feedbackType,
Long waitTime)
Creates a new
CoFeedbackTransformation from the given input. |
Modifier and Type | Method and Description |
---|---|
void |
addFeedbackEdge(StreamTransformation<F> transform)
Adds a feedback edge.
|
List<StreamTransformation<F>> |
getFeedbackEdges()
Returns the list of feedback
StreamTransformations . |
Collection<StreamTransformation<?>> |
getTransitivePredecessors()
Returns all transitive predecessor
StreamTransformation s of this StreamTransformation . |
Long |
getWaitTime()
Returns the wait time.
|
void |
setChainingStrategy(ChainingStrategy strategy)
Sets the chaining strategy of this
StreamTransformation . |
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 CoFeedbackTransformation(int parallelism, TypeInformation<F> feedbackType, Long waitTime)
CoFeedbackTransformation
from the given input.parallelism
- The parallelism of the upstream StreamTransformation
and 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.public void addFeedbackEdge(StreamTransformation<F> transform)
StreamTransformation
must match
the parallelism of the input StreamTransformation
of the upstream
StreamTransformation
.transform
- The new feedback StreamTransformation
.public List<StreamTransformation<F>> getFeedbackEdges()
StreamTransformations
.public Long getWaitTime()
public final void setChainingStrategy(ChainingStrategy strategy)
StreamTransformation
StreamTransformation
.setChainingStrategy
in class StreamTransformation<F>
public Collection<StreamTransformation<?>> getTransitivePredecessors()
StreamTransformation
StreamTransformation
s of this StreamTransformation
. 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 StreamTransformation<F>
Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.