Flink shuffle vs rebalance

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Flink shuffle vs rebalance

赢峰


Flink 中 shuffle Partitioner 和 rebalance partitoner 有什么区别?





Reply | Threaded
Open this post in threaded view
|

Re: Flink shuffle vs rebalance

Kezhu Wang
ShufflePartitioner:

      public int selectChannel(SerializationDelegate<StreamRecord<T>>
record) {
          return random.nextInt(numberOfChannels);
      }

RebalancePartitioner
     public int selectChannel(SerializationDelegate<StreamRecord<T>>
record) {
          nextChannelToSendTo = (nextChannelToSendTo + 1) %
numberOfChannels;
          return nextChannelToSendTo;
     }


一个随机,一个严格 round-robin。


Best,
Kezhu Wang

On March 15, 2021 at 22:02:33, 赢峰 ([hidden email]) wrote:



Flink 中 shuffle Partitioner 和 rebalance partitoner 有什么区别?