Problems caused by Flink's operator chain

Someone in the group asked such a question this morning. I only looked at the screenshots and didn't see his code. Then we talked for a long time there, and finally found that we were not in the same channel. I took a closer look later and his code understood To understand his logic, let me briefly describe the scenario.When the Flink stream starts, he directly sinks the original data to the es and gp libraries, and then takes two measurement streams for the processed stream, and finally outputs the two respectively. A measurement sink has reached es and gp, which is equivalent to a total of 4 sinks, but the DAG diagram he saw on the Flink UI is like this, as shown in the following figure

 He is very depressed, shouldn't it be 4 sinks? Why only 2 are displayed, and he made 2 sinks first, then processed, and finally made two sinks. The effect he wants is this ,As shown below

It is completely different from the DAG graphic display. In fact, it is not that the DAG is displayed wrong, nor is there a problem with his code. It is because he is not familiar with Flink's operator chain. Flink turns on the operator chain by default, and he will use multiple operators. Stranded together as an operator chain to execute, which can improve the performance of the program, how can I make the DAG display the effect he wants?It is actually very simple.There are two methods. The first is in the last operator ( sink

Guess you like

Origin blog.csdn.net/xianpanjia4616/article/details/94985755