MonsterChenzhuo commented on issue #1841:
URL: 
https://github.com/apache/incubator-streampark/issues/1841#issuecomment-1284304239

   
解决方案:使用java1.8的forkjoin机制,将一个trackIds列表,通过递归的方式进行拆分,这个拆分粒度设置为默认50,也就是说,如果我有500个任务,当执行到状态判断逻辑时,会将原来的单线程遍历访问jobmanage,变为10个线程,去遍历各自的sub_trackIds列表,效率大大提高。
   <img width="1190" alt="图片" 
src="https://user-images.githubusercontent.com/60029759/196754552-03ed1fb1-8d6b-4dbe-99f1-90df1db9a99a.png";>
   <img width="601" alt="图片" 
src="https://user-images.githubusercontent.com/60029759/196754575-a80a80b0-3c09-4c51-a380-3c32396be599.png";>
   
   Solution: Use java1.8 forkjoin mechanism, a list of trackIds, through the 
recursive way to split, this split granularity is set to the default 50, that 
is, if I have 500 tasks, when the implementation of the status judgment logic, 
will be the original single-threaded traversal to access the jobmanage, into 10 
threads, to traverse the respective sub_trackIds list, which is much more 
efficient.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to