RocMarshal commented on a change in pull request #11979:
URL: https://github.com/apache/flink/pull/11979#discussion_r422055502



##########
File path: docs/training/event_driven.zh.md
##########
@@ -106,21 +104,20 @@ public static class PseudoWindow extends
 }
 {% endhighlight %}
 
-Things to be aware of:
+注意事项:
 
-* There are several types of ProcessFunctions -- this is a 
`KeyedProcessFunction`, but there are also
-  `CoProcessFunctions`, `BroadcastProcessFunctions`, etc. 
+* 有几种类型的 ProcessFunctions -- 不仅包括 `KeyedProcessFunction`, 还包括
+  `CoProcessFunctions`、 `BroadcastProcessFunctions` 等. 
 
-* A `KeyedProcessFunction` is a kind of `RichFunction`. Being a 
`RichFunction`, it has access to the `open`
-  and `getRuntimeContext` methods needed for working with managed keyed state.
+* `KeyedProcessFunction` 是一种 `RichFunction`。作为 `RichFunction`,它可以访问使用 Managed 
Keyed State 所需的 `open`
+  和 `getRuntimeContext` 方法。
 
-* There are two callbacks to implement: `processElement` and `onTimer`. 
`processElement` is called
-  with each incoming event; `onTimer` is called when timers fire. These can be 
either event time or
-  processing time timers. Both `processElement` and `onTimer` are provided 
with a context object
-  that can be used to interact with a `TimerService` (among other things). 
Both callbacks are also
-  passed a `Collector` that can be used to emit results.
+* 有两个回调方法须要实现: `processElement` 和 `onTimer`。`processElement` 与每个传入事件一起调用;
+  当计时器触发时调用 `onTimer`。它们可以是事件时间(event time)timer,也可以是处理时间(processing 
time)timer。
+  `processElement` 和 `onTimer` 都提供了一个上下文对象,该对象可用于与 `TimerService` 交互(除其他外)。
+  这两个回调还传递了一个可用于发出结果的 `Collector`。
 
-#### The `open()` method
+#### `open()` 方法
 
 {% highlight java %}
 // Keyed, managed state, with an entry for each window, keyed by the window's 
end time.

Review comment:
       @klion26 
   I have translated the comments into Chinese.
   
   Sincerely,
   Roc




----------------------------------------------------------------
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:
[email protected]


Reply via email to