ifndef-SleePy commented on code in PR #21807:
URL: https://github.com/apache/flink/pull/21807#discussion_r1093946283


##########
docs/content.zh/docs/deployment/speculative_execution.md:
##########
@@ -83,6 +79,29 @@ public interface SupportsHandleExecutionAttemptSourceEvent {
 和 {{< gh_link 
file="/flink-core/src/main/java/org/apache/flink/api/connector/source/Source.java"
 name="新版 Source" >}}.
 Apache Flink 官方提供的 Source 都支持预测执行。
 
+### 让 Sink 支持预测执行
+Sink 的预测执行默认是关闭的,除非 Sink 实现了 {{< gh_link 
file="/flink-core/src/main/java/org/apache/flink/api/common/SupportsConcurrentExecutionAttempts.java"
 name="SupportsConcurrentExecutionAttempts" >}}
+接口。这里主要是兼容性方面的考虑。
+```java
+public interface SupportsConcurrentExecutionAttempts {}
+```
+接口 {{< gh_link 
file="/flink-core/src/main/java/org/apache/flink/api/common/SupportsConcurrentExecutionAttempts.java"
 name="SupportsConcurrentExecutionAttempts" >}}
+适用于 {{< gh_link 
file="/flink-core/src/main/java/org/apache/flink/api/connector/sink2/Sink.java" 
name="Sink" >}}
+,{{< gh_link 
file="/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/functions/sink/SinkFunction.java"
 name="SinkFunction" >}}
+以及 {{< gh_link 
file="/flink-core/src/main/java/org/apache/flink/api/common/io/OutputFormat.java"
 name="OutputFormat" >}}。
+
+{{< hint info >}}
+相比于预测执行,目前 Flink 会优先计算算子链接。意思是 Flink 先计算算子是否可以链接在一起,然后在检查链接后的任务是否可以支持预测执行。

Review Comment:
   OK



-- 
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