flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [flink] wuchong commented on a change in pull request #8341: [FLINK-11633][docs-zh] Translate "Working with state" into Chinese
Date Sun, 05 May 2019 08:26:18 GMT
wuchong commented on a change in pull request #8341: [FLINK-11633][docs-zh] Translate "Working
with state" into Chinese
URL: https://github.com/apache/flink/pull/8341#discussion_r281009148

 File path: docs/dev/stream/state/state.zh.md
 @@ -260,23 +225,16 @@ object ExampleCountWindowAverage extends App {
-This example implements a poor man's counting window. We key the tuples by the first field
-(in the example all have the same key `1`). The function stores the count and a running sum
-a `ValueState`. Once the count reaches 2 it will emit the average and clear the state so
-we start over from `0`. Note that this would keep a different state value for each different
-key if we had tuples with different values in the first field.
+这个例子实现了一个简单的计数窗口。 我们把元组的第一个元素当作键(在示例中都键都是
"1")。 该函数将出现的次数以及总和存储在 "ValueState" 中。 
+一旦出现次数达到 2,则将平均值发送到下游,并清除状态重新开始。
-### State Time-To-Live (TTL)
+### 状态有效期 (TTL)
-A *time-to-live* (TTL) can be assigned to the keyed state of any type. If a TTL is configured
and a
-state value has expired, the stored value will be cleaned up on a best effort basis which
-discussed in more detail below.
+任何类型的 keyed state 都可以有 *有效期* (TTL)。如果配置了 TTL 且状态值已过期,则会里最大可能清除对应的值,这会在后面详述。
 Review comment:
   任何类型的 keyed state 都可以有 *有效期* (TTL)。如果配置了 TTL 且状态值已过期,则会尽最大可能清除对应的值,这会在后面详述。

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:

With regards,
Apache Git Services

View raw message