MartijnVisser commented on code in PR #20077: URL: https://github.com/apache/flink/pull/20077#discussion_r910781680
########## docs/content.zh/docs/learn-flink/etl.md: ########## @@ -399,7 +399,7 @@ public static class ControlFunction extends RichCoFlatMapFunction<String, String 在 Flink 运行时中,`flatMap1` 和 `flatMap2` 在连接流有新元素到来时被调用 —— 在我们的例子中,`control` 流中的元素会进入 `flatMap1`,`streamOfWords` 中的元素会进入 `flatMap2`。这是由两个流连接的顺序决定的,本例中为 `control.connect(streamOfWords)`。 -认识到你没法控制 `flatMap1` 和 `flatMap2` 的调用顺序是很重要的。这两个输入流是相互竞争的关系,Flink 运行时将根据从一个流或另一个流中消费的事件做它要做的。对于需要保证时间和/或顺序的场景,你会发现在 Flink 的管理状态中缓存事件一直到它们能够被处理是必须的。(注意:如果你真的感到绝望,可以使用自定义的算子实现 `InputSelectable` 接口,在两输入算子消费它的输入流时增加一些顺序上的限制。) +认识到你没法控制 `flatMap1` 和 `flatMap2` 的调用顺序是很重要的。这两个输入流是相互竞争的关系,Flink 运行时将根据从一个流或另一个流中消费的事件做它要做的。对于需要保证时间和/或顺序的场景,你会发现在 Flink 的管理状态中缓存事件一直到它们能够被处理是必须的。(注意:如果你真的迫切需要,可以使用自定义的算子实现 [`InputSelectable`](https://nightlies.apache.org/flink/flink-docs-release-1.15/api/java/org/apache/flink/streaming/api/operators/InputSelectable.html) 接口,在两输入算子消费它的输入流时增加一些顺序上的限制。) Review Comment: ```suggestion 认识到你没法控制 `flatMap1` 和 `flatMap2` 的调用顺序是很重要的。这两个输入流是相互竞争的关系,Flink 运行时将根据从一个流或另一个流中消费的事件做它要做的。对于需要保证时间和/或顺序的场景,你会发现在 Flink 的管理状态中缓存事件一直到它们能够被处理是必须的。(注意:如果你真的迫切需要,可以使用自定义的算子实现 {{< javadoc name="InputSelectable" file="org/apache/flink/streaming/api/operators/InputSelectable.html" >}} 接口,在两输入算子消费它的输入流时增加一些顺序上的限制。) ``` -- 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]
