1
votes

i set keyby parallism 30,how can i find 30 unique keys to make datastream keyByed evenly?Does flink support this? cause i don't want too much key,and i will make the key a tag in influxdb,so i don't want to much key,avoiding oom in influxdb.But how could i use minimum key to keyby a datastream evenly?

i want to use flink to track every change (such as update/insert) on table in mysql.and i will count the change times for every table per seconds.but some table has too much changes to cause keyby data skew,so i want to use fixed number key to load balance the keyby stream.

1

1 Answers

0
votes

Technically it can, but from Your question I understand that You don't really need to usekeyBy() and You just want to do this to rebalance the stream. In such case You can easily use the rebalance() on DataStream which will cause the stream to be partitioned using round robin algorithm, which will indeed cause the load to be distributed evenly.