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_r281010333

 File path: docs/dev/stream/state/state.zh.md
 @@ -703,43 +605,33 @@ checkpointedState = context.getOperatorStateStore.getListState(descriptor)
 {% endhighlight %}
-The naming convention of the state access methods contain its redistribution
-pattern followed by its state structure. For example, to use list state with the
-union redistribution scheme on restore, access the state by using `getUnionListState(descriptor)`.
-If the method name does not contain the redistribution pattern, *e.g.* `getListState(descriptor)`,
-it simply implies that the basic even-split redistribution scheme will be used.
-After initializing the container, we use the `isRestored()` method of the context to check
if we are
-recovering after a failure. If this is `true`, *i.e.* we are recovering, the restore logic
is applied.
`getUnionListState(descriptor)` 会使用 union redistribution 算法,
+而 `getListState(descriptor)` 则简单的使用 even-split redistribution 算法。
+当初始化好状态对象后,我们通过 `isRestored()` 方法判断是否从之前的故障中恢复回来,如果该方法返回
`true` 则表示从故障中进行恢复,会执行接下来的恢复逻辑。
-As shown in the code of the modified `BufferingSink`, this `ListState` recovered during state
-initialization is kept in a class variable for future use in `snapshotState()`. There the
`ListState` is cleared
-of all objects included by the previous checkpoint, and is then filled with the new ones
we want to checkpoint.
+正入代码所示,`BufferingSink` 中初始化时,恢复回来的 `ListState` 的所有元素会添加到一个局部变量中,供下次
`snapshotState()` 时使用。
 Review comment:
   正如代码所示,`BufferingSink` 中初始化时,恢复回来的 `ListState` 的所有元素会添加到一个局部变量中,供下次
`snapshotState()` 时使用。

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