klion26 commented on a change in pull request #11808:
URL: https://github.com/apache/flink/pull/11808#discussion_r429510266



##########
File path: docs/dev/stream/operators/process_function.zh.md
##########
@@ -26,66 +26,65 @@ under the License.
 * This will be replaced by the TOC
 {:toc}
 
-## The ProcessFunction
+## ProcessFunction简介
 
-The `ProcessFunction` is a low-level stream processing operation, giving 
access to the basic building blocks of
-all (acyclic) streaming applications:
+`ProcessFunction` 是一种低级别的流处理操作,基于它用户可以访问所有(非循环)流应用程序的基本构建块:
 
-  - events (stream elements)
-  - state (fault-tolerant, consistent, only on keyed stream)
-  - timers (event time and processing time, only on keyed stream)
+   -事件(流元素)
+   -状态(容错,一致性,仅在 keyed stream 上)
+   -计时器(事件时间和处理时间,仅在 keyed stream 上)

Review comment:
       ```suggestion
     - 计时器(事件时间和处理时间,仅在 keyed stream 上)
   ```

##########
File path: docs/dev/stream/operators/process_function.zh.md
##########
@@ -26,66 +26,65 @@ under the License.
 * This will be replaced by the TOC
 {:toc}
 
-## The ProcessFunction
+## ProcessFunction简介
 
-The `ProcessFunction` is a low-level stream processing operation, giving 
access to the basic building blocks of
-all (acyclic) streaming applications:
+`ProcessFunction` 是一种低级别的流处理操作,基于它用户可以访问所有(非循环)流应用程序的基本构建块:

Review comment:
       “非循环” 改成 “无环” 会好一些吗?

##########
File path: docs/dev/stream/operators/process_function.zh.md
##########
@@ -26,66 +26,65 @@ under the License.
 * This will be replaced by the TOC
 {:toc}
 
-## The ProcessFunction
+## ProcessFunction简介

Review comment:
       ```suggestion
   ## ProcessFunction 简介
   ```

##########
File path: docs/dev/stream/operators/process_function.zh.md
##########
@@ -26,66 +26,65 @@ under the License.
 * This will be replaced by the TOC
 {:toc}
 
-## The ProcessFunction
+## ProcessFunction简介
 
-The `ProcessFunction` is a low-level stream processing operation, giving 
access to the basic building blocks of
-all (acyclic) streaming applications:
+`ProcessFunction` 是一种低级别的流处理操作,基于它用户可以访问所有(非循环)流应用程序的基本构建块:
 
-  - events (stream elements)
-  - state (fault-tolerant, consistent, only on keyed stream)
-  - timers (event time and processing time, only on keyed stream)
+   -事件(流元素)

Review comment:
       ```suggestion 
     - 事件(流元素)
   ```
   这个地方或许也可以改成其他的,达到渲染后能有相应的效果就行,下面也是
   这个效果能够在本地执行 `sh docs/build.sh -p` 后打开 localhost:4000 查看

##########
File path: docs/dev/stream/operators/process_function.zh.md
##########
@@ -26,66 +26,65 @@ under the License.
 * This will be replaced by the TOC
 {:toc}
 
-## The ProcessFunction
+## ProcessFunction简介
 
-The `ProcessFunction` is a low-level stream processing operation, giving 
access to the basic building blocks of
-all (acyclic) streaming applications:
+`ProcessFunction` 是一种低级别的流处理操作,基于它用户可以访问所有(非循环)流应用程序的基本构建块:
 
-  - events (stream elements)
-  - state (fault-tolerant, consistent, only on keyed stream)
-  - timers (event time and processing time, only on keyed stream)
+   -事件(流元素)
+   -状态(容错,一致性,仅在 keyed stream 上)

Review comment:
       ```suggestion
     - 状态(容错,一致性,仅在 keyed stream 上)
   ```

##########
File path: docs/dev/stream/operators/process_function.zh.md
##########
@@ -26,66 +26,65 @@ under the License.
 * This will be replaced by the TOC
 {:toc}
 
-## The ProcessFunction
+## ProcessFunction简介
 
-The `ProcessFunction` is a low-level stream processing operation, giving 
access to the basic building blocks of
-all (acyclic) streaming applications:
+`ProcessFunction` 是一种低级别的流处理操作,基于它用户可以访问所有(非循环)流应用程序的基本构建块:
 
-  - events (stream elements)
-  - state (fault-tolerant, consistent, only on keyed stream)
-  - timers (event time and processing time, only on keyed stream)
+   -事件(流元素)
+   -状态(容错,一致性,仅在 keyed stream 上)
+   -计时器(事件时间和处理时间,仅在 keyed stream 上)
 
-The `ProcessFunction` can be thought of as a `FlatMapFunction` with access to 
keyed state and timers. It handles events
-by being invoked for each event received in the input stream(s).
+可以将 `ProcessFunction` 视为一种可以访问 keyed state 和计时器的 `FlatMapFunction`。
+Flink 为收到的输入流中的每个事件都调用该函数来进行处理。

Review comment:
       "Flink 为收到的输入流中的每个事件" -> "Flink 为收到的输入流中每个事件" 会好一些吗?

##########
File path: docs/dev/stream/operators/process_function.zh.md
##########
@@ -26,66 +26,65 @@ under the License.
 * This will be replaced by the TOC
 {:toc}
 
-## The ProcessFunction
+## ProcessFunction简介
 
-The `ProcessFunction` is a low-level stream processing operation, giving 
access to the basic building blocks of
-all (acyclic) streaming applications:
+`ProcessFunction` 是一种低级别的流处理操作,基于它用户可以访问所有(非循环)流应用程序的基本构建块:
 
-  - events (stream elements)
-  - state (fault-tolerant, consistent, only on keyed stream)
-  - timers (event time and processing time, only on keyed stream)
+   -事件(流元素)
+   -状态(容错,一致性,仅在 keyed stream 上)
+   -计时器(事件时间和处理时间,仅在 keyed stream 上)
 
-The `ProcessFunction` can be thought of as a `FlatMapFunction` with access to 
keyed state and timers. It handles events
-by being invoked for each event received in the input stream(s).
+可以将 `ProcessFunction` 视为一种可以访问 keyed state 和计时器的 `FlatMapFunction`。
+Flink 为收到的输入流中的每个事件都调用该函数来进行处理。
 
-For fault-tolerant state, the `ProcessFunction` gives access to Flink's [keyed 
state]({{ site.baseurl }}/dev/stream/state/state.html), accessible via the
-`RuntimeContext`, similar to the way other stateful functions can access keyed 
state.
+对于容错,与其它有状态的函数类似,`ProcessFunction` 可以通过 `RuntimeContext` 
+访问 Flink 的 [keyed state]({{ site.baseurl }}/zh/dev/stream/state/state.html),
 
-The timers allow applications to react to changes in processing time and in 
[event time]({{ site.baseurl }}/dev/event_time.html).
-Every call to the function `processElement(...)` gets a `Context` object which 
gives access to the element's
-event time timestamp, and to the *TimerService*. The `TimerService` can be 
used to register callbacks for future
-event-/processing-time instants. With event-time timers, the `onTimer(...)` 
method is called when the current watermark is advanced up to or beyond the 
timestamp of the timer, while with processing-time timers, `onTimer(...)` is 
called when wall clock time reaches the specified time. During that call, all 
states are again scoped to the key with which the timer was created, allowing
-timers to manipulate keyed state.
+计时器允许应用程序对处理时间和 [事件时间]({{ site.baseurl }}/zh/dev/event_time.html) 中的更改做出反应。

Review comment:
       ```suggestion
   计时器允许应用程序对处理时间和[事件时间]({{ site.baseurl }}/zh/dev/event_time.html)中的更改做出反应。
   ```

##########
File path: docs/dev/stream/operators/process_function.zh.md
##########
@@ -26,66 +26,65 @@ under the License.
 * This will be replaced by the TOC
 {:toc}
 
-## The ProcessFunction
+## ProcessFunction简介
 
-The `ProcessFunction` is a low-level stream processing operation, giving 
access to the basic building blocks of
-all (acyclic) streaming applications:
+`ProcessFunction` 是一种低级别的流处理操作,基于它用户可以访问所有(非循环)流应用程序的基本构建块:
 
-  - events (stream elements)
-  - state (fault-tolerant, consistent, only on keyed stream)
-  - timers (event time and processing time, only on keyed stream)
+   -事件(流元素)
+   -状态(容错,一致性,仅在 keyed stream 上)
+   -计时器(事件时间和处理时间,仅在 keyed stream 上)
 
-The `ProcessFunction` can be thought of as a `FlatMapFunction` with access to 
keyed state and timers. It handles events
-by being invoked for each event received in the input stream(s).
+可以将 `ProcessFunction` 视为一种可以访问 keyed state 和计时器的 `FlatMapFunction`。
+Flink 为收到的输入流中的每个事件都调用该函数来进行处理。
 
-For fault-tolerant state, the `ProcessFunction` gives access to Flink's [keyed 
state]({{ site.baseurl }}/dev/stream/state/state.html), accessible via the
-`RuntimeContext`, similar to the way other stateful functions can access keyed 
state.
+对于容错,与其它有状态的函数类似,`ProcessFunction` 可以通过 `RuntimeContext` 
+访问 Flink 的 [keyed state]({{ site.baseurl }}/zh/dev/stream/state/state.html),
 
-The timers allow applications to react to changes in processing time and in 
[event time]({{ site.baseurl }}/dev/event_time.html).
-Every call to the function `processElement(...)` gets a `Context` object which 
gives access to the element's
-event time timestamp, and to the *TimerService*. The `TimerService` can be 
used to register callbacks for future
-event-/processing-time instants. With event-time timers, the `onTimer(...)` 
method is called when the current watermark is advanced up to or beyond the 
timestamp of the timer, while with processing-time timers, `onTimer(...)` is 
called when wall clock time reaches the specified time. During that call, all 
states are again scoped to the key with which the timer was created, allowing
-timers to manipulate keyed state.
+计时器允许应用程序对处理时间和 [事件时间]({{ site.baseurl }}/zh/dev/event_time.html) 中的更改做出反应。
+每次调用 `processElement(...)` 时参数中都会提供一个 `Context` 对象,该对象可以访问元素的事件时间戳和 
*TimerService*。 
+`TimerService` 可用于为将来特定的事件时间/处理时间注册回调。
+特定事件时间的 `onTimer(...)` 回调函数会在当前对齐的 watermark 超过所注册的时间戳时调用。

Review comment:
       `特定事件时间的` 是指 processing-time 的 timer?

##########
File path: docs/dev/stream/operators/process_function.zh.md
##########
@@ -26,66 +26,65 @@ under the License.
 * This will be replaced by the TOC
 {:toc}
 
-## The ProcessFunction
+## ProcessFunction简介
 
-The `ProcessFunction` is a low-level stream processing operation, giving 
access to the basic building blocks of
-all (acyclic) streaming applications:
+`ProcessFunction` 是一种低级别的流处理操作,基于它用户可以访问所有(非循环)流应用程序的基本构建块:
 
-  - events (stream elements)
-  - state (fault-tolerant, consistent, only on keyed stream)
-  - timers (event time and processing time, only on keyed stream)
+   -事件(流元素)
+   -状态(容错,一致性,仅在 keyed stream 上)
+   -计时器(事件时间和处理时间,仅在 keyed stream 上)
 
-The `ProcessFunction` can be thought of as a `FlatMapFunction` with access to 
keyed state and timers. It handles events
-by being invoked for each event received in the input stream(s).
+可以将 `ProcessFunction` 视为一种可以访问 keyed state 和计时器的 `FlatMapFunction`。
+Flink 为收到的输入流中的每个事件都调用该函数来进行处理。
 
-For fault-tolerant state, the `ProcessFunction` gives access to Flink's [keyed 
state]({{ site.baseurl }}/dev/stream/state/state.html), accessible via the
-`RuntimeContext`, similar to the way other stateful functions can access keyed 
state.
+对于容错,与其它有状态的函数类似,`ProcessFunction` 可以通过 `RuntimeContext` 
+访问 Flink 的 [keyed state]({{ site.baseurl }}/zh/dev/stream/state/state.html),
 
-The timers allow applications to react to changes in processing time and in 
[event time]({{ site.baseurl }}/dev/event_time.html).
-Every call to the function `processElement(...)` gets a `Context` object which 
gives access to the element's
-event time timestamp, and to the *TimerService*. The `TimerService` can be 
used to register callbacks for future
-event-/processing-time instants. With event-time timers, the `onTimer(...)` 
method is called when the current watermark is advanced up to or beyond the 
timestamp of the timer, while with processing-time timers, `onTimer(...)` is 
called when wall clock time reaches the specified time. During that call, all 
states are again scoped to the key with which the timer was created, allowing
-timers to manipulate keyed state.
+计时器允许应用程序对处理时间和 [事件时间]({{ site.baseurl }}/zh/dev/event_time.html) 中的更改做出反应。
+每次调用 `processElement(...)` 时参数中都会提供一个 `Context` 对象,该对象可以访问元素的事件时间戳和 
*TimerService*。 
+`TimerService` 可用于为将来特定的事件时间/处理时间注册回调。
+特定事件时间的 `onTimer(...)` 回调函数会在当前对齐的 watermark 超过所注册的时间戳时调用。
+特定处理时间的 `onTimer(...)` 回调函数则会在物理时间注册时间时调用。
+在该调用期间,所有状态会被再次绑定到创建计时器时的键上,从而允许计时器操作与之对应的 keyed state。
 
-<span class="label label-info">Note</span> If you want to access keyed state 
and timers you have
-to apply the `ProcessFunction` on a keyed stream:
+<span class="label label-info">Note</span> 如果想要访问 keyed state 和计时器,需要在
+ keyed stream 上使用 `ProcessFunction`。
 
 {% highlight java %}
 stream.keyBy(...).process(new MyProcessFunction())
 {% endhighlight %}
 
 
-## Low-level Joins
+## 低级别 Join
 
-To realize low-level operations on two inputs, applications can use 
`CoProcessFunction` or `KeyedCoProcessFunction`. This
-function is bound to two different inputs and gets individual calls to 
`processElement1(...)` and
-`processElement2(...)` for records from the two different inputs.
+为了在两个输入上实现低级别操作,应用程序可以使用 `CoProcessFunction` 或 `KeyedCoProcessFunction`。
+这些函数绑定两个不同的输入,从两个不同的输入中获取元素并分别调用
+`processElement1(...)` 和 `processElement2(...)` 进行处理。
 
-Implementing a low level join typically follows this pattern:
+实现低级别 join 一般需要遵循以下模式::
 
-  - Create a state object for one input (or both)
-  - Update the state upon receiving elements from its input
-  - Upon receiving elements from the other input, probe the state and produce 
the joined result
+  - 为一个输入(或两者)创建状态对象。
+  - 从输入接收元素时更新状态。
+  - 从其他输入接收元素时,查询状态并生成 join 结果。
 
-For example, you might be joining customer data to financial trades,
-while keeping state for the customer data. If you care about having
-complete and deterministic joins in the face of out-of-order events,
-you can use a timer to evaluate and emit the join for a trade when the
-watermark for the customer data stream has passed the time of that
-trade.
+例如,你可能会将客户数据与金融交易进行 join,同时想要保留客户数据的状态。
+如果你希望即使在出现乱序事件时仍然可以得到完整得确定的 join 结果,你可以
+通过注册一个计时器在 客户数据流的 watermark 已经超过当前这条finance trade记录

Review comment:
       ```suggestion
   通过注册一个计时器在客户数据流的 watermark 已经超过当前这条 finance trade 记录
   ```

##########
File path: docs/dev/stream/operators/process_function.zh.md
##########
@@ -26,66 +26,65 @@ under the License.
 * This will be replaced by the TOC
 {:toc}
 
-## The ProcessFunction
+## ProcessFunction简介
 
-The `ProcessFunction` is a low-level stream processing operation, giving 
access to the basic building blocks of
-all (acyclic) streaming applications:
+`ProcessFunction` 是一种低级别的流处理操作,基于它用户可以访问所有(非循环)流应用程序的基本构建块:
 
-  - events (stream elements)
-  - state (fault-tolerant, consistent, only on keyed stream)
-  - timers (event time and processing time, only on keyed stream)
+   -事件(流元素)
+   -状态(容错,一致性,仅在 keyed stream 上)
+   -计时器(事件时间和处理时间,仅在 keyed stream 上)
 
-The `ProcessFunction` can be thought of as a `FlatMapFunction` with access to 
keyed state and timers. It handles events
-by being invoked for each event received in the input stream(s).
+可以将 `ProcessFunction` 视为一种可以访问 keyed state 和计时器的 `FlatMapFunction`。
+Flink 为收到的输入流中的每个事件都调用该函数来进行处理。
 
-For fault-tolerant state, the `ProcessFunction` gives access to Flink's [keyed 
state]({{ site.baseurl }}/dev/stream/state/state.html), accessible via the
-`RuntimeContext`, similar to the way other stateful functions can access keyed 
state.
+对于容错,与其它有状态的函数类似,`ProcessFunction` 可以通过 `RuntimeContext` 
+访问 Flink 的 [keyed state]({{ site.baseurl }}/zh/dev/stream/state/state.html),
 
-The timers allow applications to react to changes in processing time and in 
[event time]({{ site.baseurl }}/dev/event_time.html).
-Every call to the function `processElement(...)` gets a `Context` object which 
gives access to the element's
-event time timestamp, and to the *TimerService*. The `TimerService` can be 
used to register callbacks for future
-event-/processing-time instants. With event-time timers, the `onTimer(...)` 
method is called when the current watermark is advanced up to or beyond the 
timestamp of the timer, while with processing-time timers, `onTimer(...)` is 
called when wall clock time reaches the specified time. During that call, all 
states are again scoped to the key with which the timer was created, allowing
-timers to manipulate keyed state.
+计时器允许应用程序对处理时间和 [事件时间]({{ site.baseurl }}/zh/dev/event_time.html) 中的更改做出反应。
+每次调用 `processElement(...)` 时参数中都会提供一个 `Context` 对象,该对象可以访问元素的事件时间戳和 
*TimerService*。 
+`TimerService` 可用于为将来特定的事件时间/处理时间注册回调。
+特定事件时间的 `onTimer(...)` 回调函数会在当前对齐的 watermark 超过所注册的时间戳时调用。
+特定处理时间的 `onTimer(...)` 回调函数则会在物理时间注册时间时调用。
+在该调用期间,所有状态会被再次绑定到创建计时器时的键上,从而允许计时器操作与之对应的 keyed state。
 
-<span class="label label-info">Note</span> If you want to access keyed state 
and timers you have
-to apply the `ProcessFunction` on a keyed stream:
+<span class="label label-info">Note</span> 如果想要访问 keyed state 和计时器,需要在
+ keyed stream 上使用 `ProcessFunction`。
 
 {% highlight java %}
 stream.keyBy(...).process(new MyProcessFunction())
 {% endhighlight %}
 
 
-## Low-level Joins
+## 低级别 Join
 
-To realize low-level operations on two inputs, applications can use 
`CoProcessFunction` or `KeyedCoProcessFunction`. This
-function is bound to two different inputs and gets individual calls to 
`processElement1(...)` and
-`processElement2(...)` for records from the two different inputs.
+为了在两个输入上实现低级别操作,应用程序可以使用 `CoProcessFunction` 或 `KeyedCoProcessFunction`。
+这些函数绑定两个不同的输入,从两个不同的输入中获取元素并分别调用
+`processElement1(...)` 和 `processElement2(...)` 进行处理。
 
-Implementing a low level join typically follows this pattern:
+实现低级别 join 一般需要遵循以下模式::
 
-  - Create a state object for one input (or both)
-  - Update the state upon receiving elements from its input
-  - Upon receiving elements from the other input, probe the state and produce 
the joined result
+  - 为一个输入(或两者)创建状态对象。
+  - 从输入接收元素时更新状态。

Review comment:
       这里描述一下“从当前的 stream” 接受数据时会更好一些吗?和下面的 “另外一个 stream”形成对比
   
   这里改的话,下面的描述也最好体现一下 “不是**当前流**的数据”

##########
File path: docs/dev/stream/operators/process_function.zh.md
##########
@@ -26,66 +26,65 @@ under the License.
 * This will be replaced by the TOC
 {:toc}
 
-## The ProcessFunction
+## ProcessFunction简介
 
-The `ProcessFunction` is a low-level stream processing operation, giving 
access to the basic building blocks of
-all (acyclic) streaming applications:
+`ProcessFunction` 是一种低级别的流处理操作,基于它用户可以访问所有(非循环)流应用程序的基本构建块:
 
-  - events (stream elements)
-  - state (fault-tolerant, consistent, only on keyed stream)
-  - timers (event time and processing time, only on keyed stream)
+   -事件(流元素)
+   -状态(容错,一致性,仅在 keyed stream 上)
+   -计时器(事件时间和处理时间,仅在 keyed stream 上)
 
-The `ProcessFunction` can be thought of as a `FlatMapFunction` with access to 
keyed state and timers. It handles events
-by being invoked for each event received in the input stream(s).
+可以将 `ProcessFunction` 视为一种可以访问 keyed state 和计时器的 `FlatMapFunction`。
+Flink 为收到的输入流中的每个事件都调用该函数来进行处理。
 
-For fault-tolerant state, the `ProcessFunction` gives access to Flink's [keyed 
state]({{ site.baseurl }}/dev/stream/state/state.html), accessible via the
-`RuntimeContext`, similar to the way other stateful functions can access keyed 
state.
+对于容错,与其它有状态的函数类似,`ProcessFunction` 可以通过 `RuntimeContext` 
+访问 Flink 的 [keyed state]({{ site.baseurl }}/zh/dev/stream/state/state.html),
 
-The timers allow applications to react to changes in processing time and in 
[event time]({{ site.baseurl }}/dev/event_time.html).
-Every call to the function `processElement(...)` gets a `Context` object which 
gives access to the element's
-event time timestamp, and to the *TimerService*. The `TimerService` can be 
used to register callbacks for future
-event-/processing-time instants. With event-time timers, the `onTimer(...)` 
method is called when the current watermark is advanced up to or beyond the 
timestamp of the timer, while with processing-time timers, `onTimer(...)` is 
called when wall clock time reaches the specified time. During that call, all 
states are again scoped to the key with which the timer was created, allowing
-timers to manipulate keyed state.
+计时器允许应用程序对处理时间和 [事件时间]({{ site.baseurl }}/zh/dev/event_time.html) 中的更改做出反应。
+每次调用 `processElement(...)` 时参数中都会提供一个 `Context` 对象,该对象可以访问元素的事件时间戳和 
*TimerService*。 
+`TimerService` 可用于为将来特定的事件时间/处理时间注册回调。
+特定事件时间的 `onTimer(...)` 回调函数会在当前对齐的 watermark 超过所注册的时间戳时调用。
+特定处理时间的 `onTimer(...)` 回调函数则会在物理时间注册时间时调用。
+在该调用期间,所有状态会被再次绑定到创建计时器时的键上,从而允许计时器操作与之对应的 keyed state。
 
-<span class="label label-info">Note</span> If you want to access keyed state 
and timers you have
-to apply the `ProcessFunction` on a keyed stream:
+<span class="label label-info">Note</span> 如果想要访问 keyed state 和计时器,需要在
+ keyed stream 上使用 `ProcessFunction`。
 
 {% highlight java %}
 stream.keyBy(...).process(new MyProcessFunction())
 {% endhighlight %}
 
 
-## Low-level Joins
+## 低级别 Join
 
-To realize low-level operations on two inputs, applications can use 
`CoProcessFunction` or `KeyedCoProcessFunction`. This
-function is bound to two different inputs and gets individual calls to 
`processElement1(...)` and
-`processElement2(...)` for records from the two different inputs.
+为了在两个输入上实现低级别操作,应用程序可以使用 `CoProcessFunction` 或 `KeyedCoProcessFunction`。
+这些函数绑定两个不同的输入,从两个不同的输入中获取元素并分别调用
+`processElement1(...)` 和 `processElement2(...)` 进行处理。
 
-Implementing a low level join typically follows this pattern:
+实现低级别 join 一般需要遵循以下模式::
 
-  - Create a state object for one input (or both)
-  - Update the state upon receiving elements from its input
-  - Upon receiving elements from the other input, probe the state and produce 
the joined result
+  - 为一个输入(或两者)创建状态对象。
+  - 从输入接收元素时更新状态。
+  - 从其他输入接收元素时,查询状态并生成 join 结果。
 
-For example, you might be joining customer data to financial trades,
-while keeping state for the customer data. If you care about having
-complete and deterministic joins in the face of out-of-order events,
-you can use a timer to evaluate and emit the join for a trade when the
-watermark for the customer data stream has passed the time of that
-trade.
+例如,你可能会将客户数据与金融交易进行 join,同时想要保留客户数据的状态。
+如果你希望即使在出现乱序事件时仍然可以得到完整得确定的 join 结果,你可以

Review comment:
       `完整得确定的` -> `完整且确定的` 会好一些吗?

##########
File path: docs/dev/stream/operators/process_function.zh.md
##########
@@ -284,30 +282,31 @@ override def onTimer(timestamp: Long, ctx: 
OnTimerContext, out: Collector[OUT]):
 
 ## Timers
 
-Both types of timers (processing-time and event-time) are internally 
maintained by the `TimerService` and enqueued for execution.
+两种计时器(处理时间计时器和事件时间计时器)都在 `TimerService` 内部维护,并排队等待执行。
 
-The `TimerService` deduplicates timers per key and timestamp, i.e., there is 
at most one timer per key and timestamp. If multiple timers are registered for 
the same timestamp, the `onTimer()` method will be called just once.
+对于相同的键和时间戳,`TimerService` 会删除重复的计时器,即每个键和时间戳最多有一个计时器。如果为同一时间戳注册了多个计时器,则只调用一次 
`onTimer()` 方法。
 
-<span class="label label-info">Note</span> Flink synchronizes invocations of 
`onTimer()` and `processElement()`. Hence, users do not have to worry about 
concurrent modification of state.
+<span class="label label-info">注意</span> Flink 会同步 `onTimer()` 和 
`processElement()` 的调用,因此用户不必担心状态的并发修改。
 
 ### Fault Tolerance
 
-Timers are fault tolerant and checkpointed along with the state of the 
application. 
-In case of a failure recovery or when starting an application from a 
savepoint, the timers are restored.
+计时器支持容错,它会和应用程序的状态一起进行 checkpoint。
+当进行故障恢复或从保存点启动应用程序时,计时器也会被恢复。
 
-<span class="label label-info">Note</span> Checkpointed processing-time timers 
that were supposed to fire before their restoration, will fire immediately.
-This might happen when an application recovers from a failure or when it is 
started from a savepoint.
+<span class="label label-info">注意</span> 在恢复之前就应该触发的处理时间计时器会立即触发。
+当应用程序从故障中恢复或从保存点启动时,可能会发生这种情况。
 
-<span class="label label-info">Note</span> Timers are always asynchronously 
checkpointed, except for the combination of RocksDB backend / with incremental 
snapshots / with heap-based timers (will be resolved with `FLINK-10026`).
-Notice that large numbers of timers can increase the checkpointing time 
because timers are part of the checkpointed state. See the "Timer Coalescing" 
section for advice on how to reduce the number of timers.
+<span class="label label-info">注意</span> 计时器总是异步 checkpoint,除非和 RocksDB 
backend / 增量snapshots / heap-based 计时器组合在一起(将会在 `FLINK-10026` 解决)。

Review comment:
       这里的意思应该是说“对于 RocksDB Incremental snapshot 但是使用 Heap Timer 的情况下,timer 会同步 
snapshot”
   现在 RocksDBStateBackend 有两种 Timer 的保存地方:Heap 和 RocksDB,如果 Timer 保存在 Heap 
的话,那么还是会在同步阶段进行 snapshot
   具体逻辑可以参考 
[这段代码](https://github.com/apache/flink/blob/0cc7aae86dfdb5e51c661620d39caa79a16fd647/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/operators/InternalTimeServiceManager.java#L165)




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

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to