F
- The type of the feedback elements.@Internal public class CoFeedbackTransformation<F> extends Transformation<F>
Transformation
because the only allowed operations after a
CoFeedbackTransformation
are TwoInputTransformations
.
The upstream Transformation
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
Transformations
must match the parallelism of the input Transformation
.
The upstream Transformation
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, description, id, name, outputType, typeUsed, UPPER_BOUND_MAX_PARALLELISM
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(Transformation<F> transform)
Adds a feedback edge.
|
List<Transformation<F>> |
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 CoFeedbackTransformation(int parallelism, TypeInformation<F> feedbackType, Long waitTime)
CoFeedbackTransformation
from the given input.parallelism
- The parallelism of the upstream Transformation
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(Transformation<F> transform)
Transformation
must match the
parallelism of the input Transformation
of the upstream Transformation
.transform
- The new feedback Transformation
.public List<Transformation<F>> 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<F>
public List<Transformation<?>> getInputs()
Transformation
transformations
that are the immediate predecessors of the
current transformation in the transformation graph.getInputs
in class Transformation<F>
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.