Shamit Jain
05/05/2024, 10:21 PMcode from the second stream to get the code description. I need to maintain the state so I'm using Table API with regular joins. I have millions of records of the same code in first stream because of this during join all data is landing on one KPU/taskmanager, though application is running with 60 KPUs making other 59 KPUs idle. Is there any way to distribute the data across the KPUs evenly in case of same code . I tried with broadcast also but got into issues where any update on broadcast stream for code description or code itself, I need to scan millions of records to update them using applyToKeyedState. Please give your inputs if there is any way to distribute the data evenly in this case. I am stuck here from the last one week and unable to figure out how to distribute the data across all KPUs.Kirill Ternovsky
05/05/2024, 10:48 PMtable.exec.resource.default-parallelism? https://nightlies.apache.org/flink/flink-docs-release-1.19/docs/dev/table/config/#execution-optionsShamit Jain
05/05/2024, 10:54 PMKirill Ternovsky
05/05/2024, 11:15 PMShamit Jain
05/06/2024, 2:35 AMShamit Jain
05/06/2024, 2:36 AMShamit Jain
05/06/2024, 2:36 AMEnvironmentSettings tableSettings = EnvironmentSettings
.newInstance()
.useBlinkPlanner()
.build();
StreamTableEnvironment tableEnvironment = StreamTableEnvironment.create(env,tableSettings);
Configuration config=tableEnvironment.getConfig().getConfiguration();
config.setInteger("table.exec.resource.default-parallelism",32);
return tableEnvironment;Shamit Jain
05/06/2024, 2:36 AMKirill Ternovsky
05/06/2024, 2:50 AMShamit Jain
05/06/2024, 2:53 AMShamit Jain
05/06/2024, 2:54 AMShamit Jain
05/06/2024, 2:55 AMKirill Ternovsky
05/06/2024, 2:59 AMtaskmanager.numberOfTaskSlots is 32 and you've got the table parallelism set to 32, I'm out of ideas. Maybe something in your join operation that prevents the task from being split? https://stackoverflow.com/questions/73063272/how-does-parallelism-works-when-using-flink-sqlShamit Jain
05/06/2024, 3:00 AMFlink redistributes the data across the parallel instances based on the join keyShamit Jain
05/06/2024, 3:01 AMselect * from firststream left join secondstream firststream.code=secondstream.codeShamit Jain
05/06/2024, 3:03 AMShamit Jain
05/06/2024, 3:07 AM