T - Type of the elements in the Stream@Internal public class ForwardForUnspecifiedPartitioner<T> extends ForwardPartitioner<T>
ExecutionConfig.PARALLELISM_DEFAULT and the edge's partitioner is not specified
(partitioner==null), the edge's partitioner will be set to FORWARD by default(See StreamGraph.createActualEdge(java.lang.Integer, java.lang.Integer, int, org.apache.flink.streaming.runtime.partitioner.StreamPartitioner<?>, org.apache.flink.util.OutputTag, org.apache.flink.streaming.api.transformations.StreamExchangeMode, org.apache.flink.runtime.jobgraph.IntermediateDataSetID) method for details). When using the AdaptiveBatchScheduler, this
will result in the parallelism of many job vertices is not calculated based on the amount of data
but has to align with the parallelism of their upstream vertices due to forward edges, which is
contrary to the original intention of the AdaptiveBatchScheduler.
To solve it, we introduce the ForwardForUnspecifiedPartitioner. This partitioner will
be set for unspecified edges(partitioner==null), and then the runtime framework will change it to
FORWARD/RESCALE after the operator chain creation:
1. Convert to ForwardPartitioner if the partitioner is intra-chain.
2. Convert to RescalePartitioner if the partitioner is inter-chain.
This partitioner should only be used when using AdaptiveBatchScheduler.
numberOfChannels| 构造器和说明 |
|---|
ForwardForUnspecifiedPartitioner() |
| 限定符和类型 | 方法和说明 |
|---|---|
StreamPartitioner<T> |
copy() |
org.apache.flink.runtime.io.network.api.writer.SubtaskStateMapper |
getDownstreamSubtaskStateMapper()
Defines the behavior of this partitioner, when downstream rescaled during recovery of
in-flight data.
|
int |
selectChannel(org.apache.flink.runtime.plugable.SerializationDelegate<StreamRecord<T>> record) |
getUpstreamSubtaskStateMapper, isPointwise, toStringequals, hashCode, isBroadcast, setuppublic StreamPartitioner<T> copy()
copy 在类中 ForwardPartitioner<T>public org.apache.flink.runtime.io.network.api.writer.SubtaskStateMapper getDownstreamSubtaskStateMapper()
StreamPartitionerpublic int selectChannel(org.apache.flink.runtime.plugable.SerializationDelegate<StreamRecord<T>> record)
selectChannel 在接口中 org.apache.flink.runtime.io.network.api.writer.ChannelSelector<org.apache.flink.runtime.plugable.SerializationDelegate<StreamRecord<T>>>selectChannel 在类中 ForwardPartitioner<T>Copyright © 2014–2022 The Apache Software Foundation. All rights reserved.