T - The type of the input elements and the feedback elements.@Internal public class FeedbackTransformation<T> extends StreamTransformation<T>
This is different from how iterations work in batch processing. Once a feedback point is defined
you can connect one or several StreamTransformations 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
StreamTransformations must match the parallelism of the input
StreamTransformation.
The type of the input StreamTransformation and the feedback StreamTransformation
must match.
bufferTimeout, id, idCounter, name, outputType, typeUsed| Constructor and Description |
|---|
FeedbackTransformation(StreamTransformation<T> input,
Long waitTime)
Creates a new
FeedbackTransformation from the given input. |
| Modifier and Type | Method and Description |
|---|---|
void |
addFeedbackEdge(StreamTransformation<T> transform)
Adds a feedback edge.
|
List<StreamTransformation<T>> |
getFeedbackEdges()
Returns the list of feedback
StreamTransformations. |
StreamTransformation<T> |
getInput()
Returns the input
StreamTransformation of this FeedbackTransformation. |
Collection<StreamTransformation<?>> |
getTransitivePredecessors()
Returns all transitive predecessor
StreamTransformations of this StreamTransformation. |
Long |
getWaitTime()
Returns the wait time.
|
void |
setChainingStrategy(ChainingStrategy strategy)
Sets the chaining strategy of this
StreamTransformation. |
equals, getBufferTimeout, getId, getName, getNewNodeId, getOutputType, getParallelism, getSlotSharingGroup, getUid, hashCode, setBufferTimeout, setName, setOutputType, setParallelism, setSlotSharingGroup, setUid, toStringpublic FeedbackTransformation(StreamTransformation<T> input, Long waitTime)
FeedbackTransformation from the given input.input - The input StreamTransformationwaitTime - The wait time of the feedback operator. After the time expires
the operation will close and not receive any more feedback elements.public StreamTransformation<T> getInput()
StreamTransformation of this FeedbackTransformation.public void addFeedbackEdge(StreamTransformation<T> transform)
StreamTransformation must match
the parallelism of the input StreamTransformation of this
FeedbackTransformationtransform - The new feedback StreamTransformation.public List<StreamTransformation<T>> getFeedbackEdges()
StreamTransformations.public Long getWaitTime()
public final void setChainingStrategy(ChainingStrategy strategy)
StreamTransformationStreamTransformation.setChainingStrategy in class StreamTransformation<T>public Collection<StreamTransformation<?>> getTransitivePredecessors()
StreamTransformationStreamTransformations 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<T>Copyright © 2014–2016 The Apache Software Foundation. All rights reserved.