{"action":"created","comment":{"url":"https://api.github.com/repos/flink-china/flink-china-doc/pulls/comments/56510197","id":56510197,"diff_hunk":"@@ -24,103 +24,86 @@ specific language governing permissions and limitations\n under the License.\n -->\n \n-All transformations in Flink may look like functions (in the functional processing terminology), but\n-are in fact stateful operators. You can make *every* transformation (`map`, `filter`, etc) stateful\n-by using Flink's state interface or checkpointing instance fields of your function. You can register\n-any instance field\n-as ***managed*** state by implementing an interface. In this case, and also in the case of using\n-Flink's native state interface, Flink will automatically take consistent snapshots of your state\n-periodically, and restore its value in the case of a failure.\n+Flink 中所有的转换操作看起来都像是函数调用（函数式处理术语），但它们实际上都是有状态的操作。\n+通过 Flink 的状态接口（state interface）或代码中的 checkpoint 实例变量，可以将 *每一个* 转换操作，如`map`、`filter`等，\n+变成有状态的操作。只要实现状态相关的接口，就可以在代码中将任意的实例变量注册为 ***托管的*** 状态变量。\n+通过这种方式，或者使用 Flink 原生的状态接口，Flink 能够定期对状态做一致性快照，并且在失败时从快照中恢复状态数据。\n \n-The end effect is that updates to any form of state are the same under failure-free execution and\n-execution under failures.\n+最终效果是，无论处理过程中有无失败，对任意状态的更新都是一致的。\n \n-First, we look at how to make instance fields consistent under failures, and then we look at\n-Flink's state interface.\n \n-By default state checkpoints will be stored in-memory at the JobManager. For proper persistence of large\n-state, Flink supports storing the checkpoints on file systems (HDFS, S3, or any mounted POSIX file system),\n-which can be configured in the `flink-conf.yaml` or via `StreamExecutionEnvironment.setStateBackend(…)`.\n-See [state backends]({{ site.baseurl }}/apis/streaming/state_backends.html) for information\n-about the available state backends and how to configure them.\n+首先，我们看一下如何保证状态变量在有处理失败情况下的状态一致性，然后来看一下 Flink 的状态接口。\n+\n+默认情况下，状态的 checkpoint 会被保存在 JobManager 的内存中。对于较大的状态，Flink 也支持将 checkpoint 保存在文件系统中\n+（如HDFS、S3或任意挂载的 POSIX 文件系统），可以通过 `flink-conf.yaml` 配置文件或者 `StreamExecutionEnvironment.setStateBackend(…)`\n+代码来配置如何存储checkpoint。\n+[state backends]({{ site.baseurl }}/apis/streaming/state_backends.html) 描述了可用的状态存储后台以及如何配置它们。","path":"apis/streaming/state.md","position":40,"original_position":40,"commit_id":"5b9df0d6cf3bdb741dc8a6a79fd6e648f9f8e6d9","original_commit_id":"5b9df0d6cf3bdb741dc8a6a79fd6e648f9f8e6d9","user":{"login":"wuchong","id":5378924,"avatar_url":"https://avatars.githubusercontent.com/u/5378924?v=3","gravatar_id":"","url":"https://api.github.com/users/wuchong","html_url":"https://github.com/wuchong","followers_url":"https://api.github.com/users/wuchong/followers","following_url":"https://api.github.com/users/wuchong/following{/other_user}","gists_url":"https://api.github.com/users/wuchong/gists{/gist_id}","starred_url":"https://api.github.com/users/wuchong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wuchong/subscriptions","organizations_url":"https://api.github.com/users/wuchong/orgs","repos_url":"https://api.github.com/users/wuchong/repos","events_url":"https://api.github.com/users/wuchong/events{/privacy}","received_events_url":"https://api.github.com/users/wuchong/received_events","type":"User","site_admin":false},"body":"state backends  我觉得翻译成  状态存储后端 会好些。\r\n\r\n状态存储后台 -> 状态存储后端\r\n\r\n因为 frontend -> 前端  backend -> 后端","created_at":"2016-03-17T14:16:50Z","updated_at":"2016-03-17T14:16:50Z","html_url":"https://github.com/flink-china/flink-china-doc/pull/27#discussion_r56510197","pull_request_url":"https://api.github.com/repos/flink-china/flink-china-doc/pulls/27","_links":{"self":{"href":"https://api.github.com/repos/flink-china/flink-china-doc/pulls/comments/56510197"},"html":{"href":"https://github.com/flink-china/flink-china-doc/pull/27#discussion_r56510197"},"pull_request":{"href":"https://api.github.com/repos/flink-china/flink-china-doc/pulls/27"}}},"pull_request":{"url":"https://api.github.com/repos/flink-china/flink-china-doc/pulls/27","id":63166906,"html_url":"https://github.com/flink-china/flink-china-doc/pull/27","diff_url":"https://github.com/flink-china/flink-china-doc/pull/27.diff","patch_url":"https://github.com/flink-china/flink-china-doc/pull/27.patch","issue_url":"https://api.github.com/repos/flink-china/flink-china-doc/issues/27","number":27,"state":"open","locked":false,"title":"翻译了state.md","user":{"login":"unsleepy22","id":631361,"avatar_url":"https://avatars.githubusercontent.com/u/631361?v=3","gravatar_id":"","url":"https://api.github.com/users/unsleepy22","html_url":"https://github.com/unsleepy22","followers_url":"https://api.github.com/users/unsleepy22/followers","following_url":"https://api.github.com/users/unsleepy22/following{/other_user}","gists_url":"https://api.github.com/users/unsleepy22/gists{/gist_id}","starred_url":"https://api.github.com/users/unsleepy22/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/unsleepy22/subscriptions","organizations_url":"https://api.github.com/users/unsleepy22/orgs","repos_url":"https://api.github.com/users/unsleepy22/repos","events_url":"https://api.github.com/users/unsleepy22/events{/privacy}","received_events_url":"https://api.github.com/users/unsleepy22/received_events","type":"User","site_admin":false},"body":"有一个地方没有翻译 rich function，这个不知道怎么翻译了，保留了原文","created_at":"2016-03-17T02:57:54Z","updated_at":"2016-03-17T14:16:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2a0bb37765ad6e4474d5a0fa8582042379ad7afe","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/flink-china/flink-china-doc/pulls/27/commits","review_comments_url":"https://api.github.com/repos/flink-china/flink-china-doc/pulls/27/comments","review_comment_url":"https://api.github.com/repos/flink-china/flink-china-doc/pulls/comments{/number}","comments_url":"https://api.github.com/repos/flink-china/flink-china-doc/issues/27/comments","statuses_url":"https://api.github.com/repos/flink-china/flink-china-doc/statuses/5b9df0d6cf3bdb741dc8a6a79fd6e648f9f8e6d9","head":{"label":"unsleepy22:state","ref":"state","sha":"5b9df0d6cf3bdb741dc8a6a79fd6e648f9f8e6d9","user":{"login":"unsleepy22","id":631361,"avatar_url":"https://avatars.githubusercontent.com/u/631361?v=3","gravatar_id":"","url":"https://api.github.com/users/unsleepy22","html_url":"https://github.com/unsleepy22","followers_url":"https://api.github.com/users/unsleepy22/followers","following_url":"https://api.github.com/users/unsleepy22/following{/other_user}","gists_url":"https://api.github.com/users/unsleepy22/gists{/gist_id}","starred_url":"https://api.github.com/users/unsleepy22/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/unsleepy22/subscriptions","organizations_url":"https://api.github.com/users/unsleepy22/orgs","repos_url":"https://api.github.com/users/unsleepy22/repos","events_url":"https://api.github.com/users/unsleepy22/events{/privacy}","received_events_url":"https://api.github.com/users/unsleepy22/received_events","type":"User","site_admin":false},"repo":{"id":53197958,"name":"flink-china-doc","full_name":"unsleepy22/flink-china-doc","owner":{"login":"unsleepy22","id":631361,"avatar_url":"https://avatars.githubusercontent.com/u/631361?v=3","gravatar_id":"","url":"https://api.github.com/users/unsleepy22","html_url":"https://github.com/unsleepy22","followers_url":"https://api.github.com/users/unsleepy22/followers","following_url":"https://api.github.com/users/unsleepy22/following{/other_user}","gists_url":"https://api.github.com/users/unsleepy22/gists{/gist_id}","starred_url":"https://api.github.com/users/unsleepy22/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/unsleepy22/subscriptions","organizations_url":"https://api.github.com/users/unsleepy22/orgs","repos_url":"https://api.github.com/users/unsleepy22/repos","events_url":"https://api.github.com/users/unsleepy22/events{/privacy}","received_events_url":"https://api.github.com/users/unsleepy22/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/unsleepy22/flink-china-doc","description":"Flink 官方文档中文翻译项目 :cn:","fork":true,"url":"https://api.github.com/repos/unsleepy22/flink-china-doc","forks_url":"https://api.github.com/repos/unsleepy22/flink-china-doc/forks","keys_url":"https://api.github.com/repos/unsleepy22/flink-china-doc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/unsleepy22/flink-china-doc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/unsleepy22/flink-china-doc/teams","hooks_url":"https://api.github.com/repos/unsleepy22/flink-china-doc/hooks","issue_events_url":"https://api.github.com/repos/unsleepy22/flink-china-doc/issues/events{/number}","events_url":"https://api.github.com/repos/unsleepy22/flink-china-doc/events","assignees_url":"https://api.github.com/repos/unsleepy22/flink-china-doc/assignees{/user}","branches_url":"https://api.github.com/repos/unsleepy22/flink-china-doc/branches{/branch}","tags_url":"https://api.github.com/repos/unsleepy22/flink-china-doc/tags","blobs_url":"https://api.github.com/repos/unsleepy22/flink-china-doc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/unsleepy22/flink-china-doc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/unsleepy22/flink-china-doc/git/refs{/sha}","trees_url":"https://api.github.com/repos/unsleepy22/flink-china-doc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/unsleepy22/flink-china-doc/statuses/{sha}","languages_url":"https://api.github.com/repos/unsleepy22/flink-china-doc/languages","stargazers_url":"https://api.github.com/repos/unsleepy22/flink-china-doc/stargazers","contributors_url":"https://api.github.com/repos/unsleepy22/flink-china-doc/contributors","subscribers_url":"https://api.github.com/repos/unsleepy22/flink-china-doc/subscribers","subscription_url":"https://api.github.com/repos/unsleepy22/flink-china-doc/subscription","commits_url":"https://api.github.com/repos/unsleepy22/flink-china-doc/commits{/sha}","git_commits_url":"https://api.github.com/repos/unsleepy22/flink-china-doc/git/commits{/sha}","comments_url":"https://api.github.com/repos/unsleepy22/flink-china-doc/comments{/number}","issue_comment_url":"https://api.github.com/repos/unsleepy22/flink-china-doc/issues/comments{/number}","contents_url":"https://api.github.com/repos/unsleepy22/flink-china-doc/contents/{+path}","compare_url":"https://api.github.com/repos/unsleepy22/flink-china-doc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/unsleepy22/flink-china-doc/merges","archive_url":"https://api.github.com/repos/unsleepy22/flink-china-doc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/unsleepy22/flink-china-doc/downloads","issues_url":"https://api.github.com/repos/unsleepy22/flink-china-doc/issues{/number}","pulls_url":"https://api.github.com/repos/unsleepy22/flink-china-doc/pulls{/number}","milestones_url":"https://api.github.com/repos/unsleepy22/flink-china-doc/milestones{/number}","notifications_url":"https://api.github.com/repos/unsleepy22/flink-china-doc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/unsleepy22/flink-china-doc/labels{/name}","releases_url":"https://api.github.com/repos/unsleepy22/flink-china-doc/releases{/id}","deployments_url":"https://api.github.com/repos/unsleepy22/flink-china-doc/deployments","created_at":"2016-03-05T11:22:57Z","updated_at":"2016-03-05T11:22:59Z","pushed_at":"2016-03-17T02:56:51Z","git_url":"git://github.com/unsleepy22/flink-china-doc.git","ssh_url":"git@github.com:unsleepy22/flink-china-doc.git","clone_url":"https://github.com/unsleepy22/flink-china-doc.git","svn_url":"https://github.com/unsleepy22/flink-china-doc","homepage":"http://doc.flink-china.org","size":5762,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"flink-china:master","ref":"master","sha":"59878452651169d5063d29db5ac242f0e13cc4bf","user":{"login":"flink-china","id":17588915,"avatar_url":"https://avatars.githubusercontent.com/u/17588915?v=3","gravatar_id":"","url":"https://api.github.com/users/flink-china","html_url":"https://github.com/flink-china","followers_url":"https://api.github.com/users/flink-china/followers","following_url":"https://api.github.com/users/flink-china/following{/other_user}","gists_url":"https://api.github.com/users/flink-china/gists{/gist_id}","starred_url":"https://api.github.com/users/flink-china/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flink-china/subscriptions","organizations_url":"https://api.github.com/users/flink-china/orgs","repos_url":"https://api.github.com/users/flink-china/repos","events_url":"https://api.github.com/users/flink-china/events{/privacy}","received_events_url":"https://api.github.com/users/flink-china/received_events","type":"Organization","site_admin":false},"repo":{"id":52929777,"name":"flink-china-doc","full_name":"flink-china/flink-china-doc","owner":{"login":"flink-china","id":17588915,"avatar_url":"https://avatars.githubusercontent.com/u/17588915?v=3","gravatar_id":"","url":"https://api.github.com/users/flink-china","html_url":"https://github.com/flink-china","followers_url":"https://api.github.com/users/flink-china/followers","following_url":"https://api.github.com/users/flink-china/following{/other_user}","gists_url":"https://api.github.com/users/flink-china/gists{/gist_id}","starred_url":"https://api.github.com/users/flink-china/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flink-china/subscriptions","organizations_url":"https://api.github.com/users/flink-china/orgs","repos_url":"https://api.github.com/users/flink-china/repos","events_url":"https://api.github.com/users/flink-china/events{/privacy}","received_events_url":"https://api.github.com/users/flink-china/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/flink-china/flink-china-doc","description":"Flink 官方文档中文翻译项目 :cn:","fork":false,"url":"https://api.github.com/repos/flink-china/flink-china-doc","forks_url":"https://api.github.com/repos/flink-china/flink-china-doc/forks","keys_url":"https://api.github.com/repos/flink-china/flink-china-doc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/flink-china/flink-china-doc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/flink-china/flink-china-doc/teams","hooks_url":"https://api.github.com/repos/flink-china/flink-china-doc/hooks","issue_events_url":"https://api.github.com/repos/flink-china/flink-china-doc/issues/events{/number}","events_url":"https://api.github.com/repos/flink-china/flink-china-doc/events","assignees_url":"https://api.github.com/repos/flink-china/flink-china-doc/assignees{/user}","branches_url":"https://api.github.com/repos/flink-china/flink-china-doc/branches{/branch}","tags_url":"https://api.github.com/repos/flink-china/flink-china-doc/tags","blobs_url":"https://api.github.com/repos/flink-china/flink-china-doc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/flink-china/flink-china-doc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/flink-china/flink-china-doc/git/refs{/sha}","trees_url":"https://api.github.com/repos/flink-china/flink-china-doc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/flink-china/flink-china-doc/statuses/{sha}","languages_url":"https://api.github.com/repos/flink-china/flink-china-doc/languages","stargazers_url":"https://api.github.com/repos/flink-china/flink-china-doc/stargazers","contributors_url":"https://api.github.com/repos/flink-china/flink-china-doc/contributors","subscribers_url":"https://api.github.com/repos/flink-china/flink-china-doc/subscribers","subscription_url":"https://api.github.com/repos/flink-china/flink-china-doc/subscription","commits_url":"https://api.github.com/repos/flink-china/flink-china-doc/commits{/sha}","git_commits_url":"https://api.github.com/repos/flink-china/flink-china-doc/git/commits{/sha}","comments_url":"https://api.github.com/repos/flink-china/flink-china-doc/comments{/number}","issue_comment_url":"https://api.github.com/repos/flink-china/flink-china-doc/issues/comments{/number}","contents_url":"https://api.github.com/repos/flink-china/flink-china-doc/contents/{+path}","compare_url":"https://api.github.com/repos/flink-china/flink-china-doc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/flink-china/flink-china-doc/merges","archive_url":"https://api.github.com/repos/flink-china/flink-china-doc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/flink-china/flink-china-doc/downloads","issues_url":"https://api.github.com/repos/flink-china/flink-china-doc/issues{/number}","pulls_url":"https://api.github.com/repos/flink-china/flink-china-doc/pulls{/number}","milestones_url":"https://api.github.com/repos/flink-china/flink-china-doc/milestones{/number}","notifications_url":"https://api.github.com/repos/flink-china/flink-china-doc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/flink-china/flink-china-doc/labels{/name}","releases_url":"https://api.github.com/repos/flink-china/flink-china-doc/releases{/id}","deployments_url":"https://api.github.com/repos/flink-china/flink-china-doc/deployments","created_at":"2016-03-02T03:16:55Z","updated_at":"2016-03-16T02:03:49Z","pushed_at":"2016-03-17T14:09:46Z","git_url":"git://github.com/flink-china/flink-china-doc.git","ssh_url":"git@github.com:flink-china/flink-china-doc.git","clone_url":"https://github.com/flink-china/flink-china-doc.git","svn_url":"https://github.com/flink-china/flink-china-doc","homepage":"http://doc.flink-china.org","size":5779,"stargazers_count":11,"watchers_count":11,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":13,"mirror_url":null,"open_issues_count":9,"forks":13,"open_issues":9,"watchers":11,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/flink-china/flink-china-doc/pulls/27"},"html":{"href":"https://github.com/flink-china/flink-china-doc/pull/27"},"issue":{"href":"https://api.github.com/repos/flink-china/flink-china-doc/issues/27"},"comments":{"href":"https://api.github.com/repos/flink-china/flink-china-doc/issues/27/comments"},"review_comments":{"href":"https://api.github.com/repos/flink-china/flink-china-doc/pulls/27/comments"},"review_comment":{"href":"https://api.github.com/repos/flink-china/flink-china-doc/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/flink-china/flink-china-doc/pulls/27/commits"},"statuses":{"href":"https://api.github.com/repos/flink-china/flink-china-doc/statuses/5b9df0d6cf3bdb741dc8a6a79fd6e648f9f8e6d9"}}}}