官网代码:
DataStream<Integer> input = ...;
final OutputTag<String> outputTag = new OutputTag<String>("side-output"){};
SingleOutputStreamOperator<Integer> mainDataStream = input
使用代码:
final OutputTag<String> outputTag = new OutputTag<String>("side-output"){};
SingleOutputStreamOperator<Integer> mainDataStream = ...;
DataStream<String> sideOutputStream = mainDataStream.getSideOutput(outputTag);
参考路径:https://ci.apache.org/projects/flink/flink-docs-release-1.6/dev/stream/side_output.html
文章来源: https://blog.csdn.net/qq_31866793/article/details/90755076