Class PartitionTransformation<T>
- java.lang.Object
-
- org.apache.flink.api.dag.Transformation<T>
-
- org.apache.flink.streaming.api.transformations.PartitionTransformation<T>
-
- Type Parameters:
T
- The type of the elements that result from thisPartitionTransformation
@Internal public class PartitionTransformation<T> extends Transformation<T>
This transformation represents a change of partitioning of the input elements.This does not create a physical operation, it only affects how upstream operations are connected to downstream operations.
-
-
Field Summary
-
Fields inherited from class org.apache.flink.api.dag.Transformation
bufferTimeout, description, id, name, outputType, typeUsed, UPPER_BOUND_MAX_PARALLELISM
-
-
Constructor Summary
Constructors Constructor Description PartitionTransformation(Transformation<T> input, StreamPartitioner<T> partitioner)
Creates a newPartitionTransformation
from the given input andStreamPartitioner
.PartitionTransformation(Transformation<T> input, StreamPartitioner<T> partitioner, StreamExchangeMode exchangeMode)
Creates a newPartitionTransformation
from the given input andStreamPartitioner
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StreamExchangeMode
getExchangeMode()
Returns theStreamExchangeMode
of thisPartitionTransformation
.List<Transformation<?>>
getInputs()
Returns thetransformations
that are the immediate predecessors of the current transformation in the transformation graph.StreamPartitioner<T>
getPartitioner()
Returns theStreamPartitioner
that must be used for partitioning the elements of the inputTransformation
.protected List<Transformation<?>>
getTransitivePredecessorsInternal()
Returns all transitive predecessorTransformation
s of thisTransformation
.-
Methods inherited from class org.apache.flink.api.dag.Transformation
declareManagedMemoryUseCaseAtOperatorScope, declareManagedMemoryUseCaseAtSlotScope, equals, getAttribute, getBufferTimeout, getCoLocationGroupKey, getDescription, getId, getManagedMemoryOperatorScopeUseCaseWeights, getManagedMemorySlotScopeUseCases, getMaxParallelism, getMinResources, getName, getNewNodeId, getOutputType, getParallelism, getPreferredResources, getSlotSharingGroup, getTransitivePredecessors, getUid, getUserProvidedNodeHash, hashCode, isParallelismConfigured, setAttribute, setBufferTimeout, setCoLocationGroupKey, setDescription, setMaxParallelism, setName, setOutputType, setParallelism, setParallelism, setResources, setSlotSharingGroup, setSlotSharingGroup, setUid, setUidHash, toString, updateManagedMemoryStateBackendUseCase
-
-
-
-
Constructor Detail
-
PartitionTransformation
public PartitionTransformation(Transformation<T> input, StreamPartitioner<T> partitioner)
Creates a newPartitionTransformation
from the given input andStreamPartitioner
.- Parameters:
input
- The inputTransformation
partitioner
- TheStreamPartitioner
-
PartitionTransformation
public PartitionTransformation(Transformation<T> input, StreamPartitioner<T> partitioner, StreamExchangeMode exchangeMode)
Creates a newPartitionTransformation
from the given input andStreamPartitioner
.- Parameters:
input
- The inputTransformation
partitioner
- TheStreamPartitioner
exchangeMode
- TheStreamExchangeMode
-
-
Method Detail
-
getPartitioner
public StreamPartitioner<T> getPartitioner()
Returns theStreamPartitioner
that must be used for partitioning the elements of the inputTransformation
.
-
getExchangeMode
public StreamExchangeMode getExchangeMode()
Returns theStreamExchangeMode
of thisPartitionTransformation
.
-
getTransitivePredecessorsInternal
protected List<Transformation<?>> getTransitivePredecessorsInternal()
Description copied from class:Transformation
Returns all transitive predecessorTransformation
s of thisTransformation
. This is, for example, used when determining whether a feedback edge of an iteration actually has the iteration head as a predecessor.- Specified by:
getTransitivePredecessorsInternal
in classTransformation<T>
- Returns:
- The list of transitive predecessors.
-
getInputs
public List<Transformation<?>> getInputs()
Description copied from class:Transformation
Returns thetransformations
that are the immediate predecessors of the current transformation in the transformation graph.- Specified by:
getInputs
in classTransformation<T>
-
-