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



##########
File path: docs/training/event_driven.zh.md
##########
@@ -202,52 +196,48 @@ public void onTimer(
 }
 {% endhighlight %}
 
-Observations:
+观察:
 
-* The `OnTimerContext context` passed in to `onTimer` can be used to determine 
the current key.
+* 传递给 `onTimer` 的 `OnTimerContext context` 可用于确定当前 key。
 
-* Our pseudo-windows are being triggered when the current watermark reaches 
the end of each hour, at
-  which point `onTimer` is called. This onTimer method removes the related 
entry from `sumOfTips`,
-  which has the effect of making it impossible to accommodate late events. 
This is the equivalent of
-  setting the allowedLateness to zero when working with Flink's time windows.
+* 我们的 pseudo-windows 在当前 Watermark 到达每小时结束时触发,此时调用 `onTimer`。
+  这个 `onTimer` 方法从 `sumOfTips` 中删除相关的条目,这样做的效果是不可能容纳延迟的事件。
+  这相当于在使用 Flink 的时间窗口时将 allowedLateness 设置为零。
 
-### Performance Considerations
+### 性能考虑
 
-Flink provides `MapState` and `ListState` types that are optimized for 
RocksDB. Where possible,
-these should be used instead of a `ValueState` object holding some sort of 
collection. The RocksDB
-state backend can append to `ListState` without going through 
(de)serialization, and for `MapState`, each
-key/value pair is a separate RocksDB object, so `MapState` can be efficiently 
accessed and updated.
+在可能的情况下,应该使用这些对象,而不是持有某种集合的 `ValueState` 对象。

Review comment:
       Hi, @klion26 
   I have made some improvements according your suggestion and the original 
text. Thank 
    you.
   
   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:
us...@infra.apache.org


Reply via email to