Load balance across the partitions

11 views
Skip to first unread message

sank...@gmail.com

unread,
Nov 28, 2017, 1:30:36 AM11/28/17
to DataTorrent Users Group
Hi All,

In one of the application we are using 32 partitions. Now we wanted to improve the application  by incrementing the number of partitions , But we see that load is not balanced across all the partitions. We have tried 35,33 partitions.

Please tell me how to balance the load across the partitions where number of partitions in not 2^N

Sandesh Hegde

unread,
Nov 28, 2017, 9:11:57 PM11/28/17
to DataTorrent Users Group
If you are using Stateless partitioner & default stream codec, it uses Key based partitioning and hashcode of the tuple to decide the partition. One option is to use the custom stream codec and play with "getPartition", for more info on StreamCodec follow https://www.datatorrent.com/blog/get-know-streamcodecs/

Other option is to use the Custom partitioner and set the masks accordingly. You can watch this video for reference: https://www.youtube.com/watch?v=HCATB1zlLE4
Reply all
Reply to author
Forward
0 new messages