{"action":"created","comment":{"url":"https://api.github.com/repos/flink-china/flink-china-doc/pulls/comments/56477102","id":56477102,"diff_hunk":"@@ -24,95 +24,74 @@ specific language governing permissions and limitations\n under the License.\n -->\n \n-This document describes Flink's fault tolerance mechanism for streaming data flows.\n+本文档描述了 Flink 对于流式数据的错误容忍处理机制。\n \n * This will be replaced by the TOC\n {:toc}\n \n \n-## Introduction\n+## 简介\n \n-Apache Flink offers a fault tolerance mechanism to consistently recover the state of data streaming applications.\n-The mechanism ensures that even in the presence of failures, the program's state will eventually reflect every\n-record from the data stream **exactly once**. Note that there is a switch to *downgrade* the guarantees to *at least once*\n-(described below).\n+Apache Flink 为流式的数据应用提供了一种机制，使得应用从失败中恢复的时候可以维持一致的状态，一致的状态可以保证每条数据都能正确恢复，从而提供 **exactly-once** 的语义。另外 Apache Flink 还提供了降级的机制，只保证 *at least once* 的语义。\n \n-The fault tolerance mechanism continuously draws snapshots of the distributed streaming data flow. For streaming applications\n-with small state, these snapshots are very light-weight and can be drawn frequently without impacting the performance much.\n-The state of the streaming applications is stored at a configurable place (such as the master node, or HDFS).\n+这个机制在整个计算的过程中，通过持续不断的给分布式数据流的状态信息打上快照来实现。相对于那些只维护较少数据量的状态的应用，打快照是非常轻量级的，可以持续地操作而并不会对性能造成多大的影响。\n+这些状态的快照数据可以根据配置，存储到对应的持久存储器上(例如存到 master 节点，或者 HDFS)\n \n-In case of a program failure (due to machine-, network-, or software failure), Flink stops the distributed streaming dataflow.\n-The system then restarts the operators and resets them to the latest successful checkpoint. The input streams are reset to the\n-point of the state snapshot. Any records that are processed as part of the restarted parallel dataflow are guaranteed to not\n-have been part of the checkpointed state before.\n+假设出现了程序失败的情况(原因可能是机器，网络，或者是某些应用逻辑导致)，Flink 需要停止数据流。\n+然后重启计算节点，并把它的状态恢复到最新备份成功的检查点(checkpoint)，输入数据流也会被重置到检查点开始重放。重放的数据流保证是在检查点后面且还没计算过的输入数据。\n \n-*Note:* For this mechanism to realize its full guarantees, the data stream source (such as message queue or broker) needs to be able\n-to rewind the stream to a defined recent point. [Apache Kafka](http://kafka.apache.org) has this ability and Flink's connector to\n-Kafka exploits this ability.\n- \n-*Note:* Because Flink's checkpoints are realized through distributed snapshots, we use the words *snapshot* and *checkpoint* interchangeably.\n+*注意:* 对于Flink的保证机制, 同时需要输入数据流的模块(可能是一个消息队列或者代理)拥有能回放数据的功能。例如 [Apache Kafka](http://kafka.apache.org) 就有这个功能，用户只需要把Kafka作为Flink的连接器就可以了。\n \n+*注意:* 因为Flink的检查点功能是通过分布式快照来实现的。我们后面可能会交替地使用 *快照* 或者 *检查点* 两个词。\n \n-## Checkpointing\n \n-The central part of Flink's fault tolerance mechanism is drawing consistent snapshots of the distributed data stream and operator state.\n-These snapshots act as consistent checkpoints to which the system can fall back in case of a failure. Flink's mechanism for drawing these\n-snapshots is described in \"[Lightweight Asynchronous Snapshots for Distributed Dataflows](http://arxiv.org/abs/1506.08603)\". It is inspired by \n-the standard [Chandy-Lamport algorithm](http://research.microsoft.com/en-us/um/people/lamport/pubs/chandy.pdf) for distributed snapshots and is \n-specifically tailored to Flink's execution model.\n+## 检查点机制（Checkpointing）\n \n+Flink的错误容忍机制最核心的部分就是把数据流和计算节点的状态一起生成一致性的快照。\n+这些快照组成一个个的检查点(checkpoint)，使得系统在失败的时候能够恢复到备份时的状态。Flink的快照生成算法在以下这篇论文中有详细描述 \"[Lightweight Asynchronous Snapshots for Distributed Dataflows](http://arxiv.org/abs/1506.08603)\". 这个算法是受到Chandy-Lamport算法的启发 [Chandy-Lamport algorithm](http://research.microsoft.com/en-us/um/people/lamport/pubs/chandy.pdf) 并且经过一些裁剪来适配Flink的运行模型。","path":"internals/stream_checkpointing.md","position":64,"original_position":64,"commit_id":"683b700ed714923d4483d67361b0075a441455ce","original_commit_id":"683b700ed714923d4483d67361b0075a441455ce","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":"最后半句话\r\n\r\n并且针对 Flink 的运行模型进行了一些简化。","created_at":"2016-03-17T09:40:05Z","updated_at":"2016-03-17T09:40:05Z","html_url":"https://github.com/flink-china/flink-china-doc/pull/28#discussion_r56477102","pull_request_url":"https://api.github.com/repos/flink-china/flink-china-doc/pulls/28","_links":{"self":{"href":"https://api.github.com/repos/flink-china/flink-china-doc/pulls/comments/56477102"},"html":{"href":"https://github.com/flink-china/flink-china-doc/pull/28#discussion_r56477102"},"pull_request":{"href":"https://api.github.com/repos/flink-china/flink-china-doc/pulls/28"}}},"pull_request":{"url":"https://api.github.com/repos/flink-china/flink-china-doc/pulls/28","id":63178007,"html_url":"https://github.com/flink-china/flink-china-doc/pull/28","diff_url":"https://github.com/flink-china/flink-china-doc/pull/28.diff","patch_url":"https://github.com/flink-china/flink-china-doc/pull/28.patch","issue_url":"https://api.github.com/repos/flink-china/flink-china-doc/issues/28","number":28,"state":"open","locked":false,"title":"commit the translation of \"Fault Tolerance for Data Streaming\"","user":{"login":"bakey","id":1566848,"avatar_url":"https://avatars.githubusercontent.com/u/1566848?v=3","gravatar_id":"","url":"https://api.github.com/users/bakey","html_url":"https://github.com/bakey","followers_url":"https://api.github.com/users/bakey/followers","following_url":"https://api.github.com/users/bakey/following{/other_user}","gists_url":"https://api.github.com/users/bakey/gists{/gist_id}","starred_url":"https://api.github.com/users/bakey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bakey/subscriptions","organizations_url":"https://api.github.com/users/bakey/orgs","repos_url":"https://api.github.com/users/bakey/repos","events_url":"https://api.github.com/users/bakey/events{/privacy}","received_events_url":"https://api.github.com/users/bakey/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-03-17T06:18:14Z","updated_at":"2016-03-17T09:40:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a6b1cf21b3cc1eafdc44013d6cfa43fb61313ff0","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/flink-china/flink-china-doc/pulls/28/commits","review_comments_url":"https://api.github.com/repos/flink-china/flink-china-doc/pulls/28/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/28/comments","statuses_url":"https://api.github.com/repos/flink-china/flink-china-doc/statuses/683b700ed714923d4483d67361b0075a441455ce","head":{"label":"bakey:master","ref":"master","sha":"683b700ed714923d4483d67361b0075a441455ce","user":{"login":"bakey","id":1566848,"avatar_url":"https://avatars.githubusercontent.com/u/1566848?v=3","gravatar_id":"","url":"https://api.github.com/users/bakey","html_url":"https://github.com/bakey","followers_url":"https://api.github.com/users/bakey/followers","following_url":"https://api.github.com/users/bakey/following{/other_user}","gists_url":"https://api.github.com/users/bakey/gists{/gist_id}","starred_url":"https://api.github.com/users/bakey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bakey/subscriptions","organizations_url":"https://api.github.com/users/bakey/orgs","repos_url":"https://api.github.com/users/bakey/repos","events_url":"https://api.github.com/users/bakey/events{/privacy}","received_events_url":"https://api.github.com/users/bakey/received_events","type":"User","site_admin":false},"repo":{"id":53544433,"name":"flink-china-doc","full_name":"bakey/flink-china-doc","owner":{"login":"bakey","id":1566848,"avatar_url":"https://avatars.githubusercontent.com/u/1566848?v=3","gravatar_id":"","url":"https://api.github.com/users/bakey","html_url":"https://github.com/bakey","followers_url":"https://api.github.com/users/bakey/followers","following_url":"https://api.github.com/users/bakey/following{/other_user}","gists_url":"https://api.github.com/users/bakey/gists{/gist_id}","starred_url":"https://api.github.com/users/bakey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bakey/subscriptions","organizations_url":"https://api.github.com/users/bakey/orgs","repos_url":"https://api.github.com/users/bakey/repos","events_url":"https://api.github.com/users/bakey/events{/privacy}","received_events_url":"https://api.github.com/users/bakey/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bakey/flink-china-doc","description":"Flink 官方文档中文翻译项目 :cn:","fork":true,"url":"https://api.github.com/repos/bakey/flink-china-doc","forks_url":"https://api.github.com/repos/bakey/flink-china-doc/forks","keys_url":"https://api.github.com/repos/bakey/flink-china-doc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bakey/flink-china-doc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bakey/flink-china-doc/teams","hooks_url":"https://api.github.com/repos/bakey/flink-china-doc/hooks","issue_events_url":"https://api.github.com/repos/bakey/flink-china-doc/issues/events{/number}","events_url":"https://api.github.com/repos/bakey/flink-china-doc/events","assignees_url":"https://api.github.com/repos/bakey/flink-china-doc/assignees{/user}","branches_url":"https://api.github.com/repos/bakey/flink-china-doc/branches{/branch}","tags_url":"https://api.github.com/repos/bakey/flink-china-doc/tags","blobs_url":"https://api.github.com/repos/bakey/flink-china-doc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bakey/flink-china-doc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bakey/flink-china-doc/git/refs{/sha}","trees_url":"https://api.github.com/repos/bakey/flink-china-doc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bakey/flink-china-doc/statuses/{sha}","languages_url":"https://api.github.com/repos/bakey/flink-china-doc/languages","stargazers_url":"https://api.github.com/repos/bakey/flink-china-doc/stargazers","contributors_url":"https://api.github.com/repos/bakey/flink-china-doc/contributors","subscribers_url":"https://api.github.com/repos/bakey/flink-china-doc/subscribers","subscription_url":"https://api.github.com/repos/bakey/flink-china-doc/subscription","commits_url":"https://api.github.com/repos/bakey/flink-china-doc/commits{/sha}","git_commits_url":"https://api.github.com/repos/bakey/flink-china-doc/git/commits{/sha}","comments_url":"https://api.github.com/repos/bakey/flink-china-doc/comments{/number}","issue_comment_url":"https://api.github.com/repos/bakey/flink-china-doc/issues/comments{/number}","contents_url":"https://api.github.com/repos/bakey/flink-china-doc/contents/{+path}","compare_url":"https://api.github.com/repos/bakey/flink-china-doc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bakey/flink-china-doc/merges","archive_url":"https://api.github.com/repos/bakey/flink-china-doc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bakey/flink-china-doc/downloads","issues_url":"https://api.github.com/repos/bakey/flink-china-doc/issues{/number}","pulls_url":"https://api.github.com/repos/bakey/flink-china-doc/pulls{/number}","milestones_url":"https://api.github.com/repos/bakey/flink-china-doc/milestones{/number}","notifications_url":"https://api.github.com/repos/bakey/flink-china-doc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bakey/flink-china-doc/labels{/name}","releases_url":"https://api.github.com/repos/bakey/flink-china-doc/releases{/id}","deployments_url":"https://api.github.com/repos/bakey/flink-china-doc/deployments","created_at":"2016-03-10T01:16:32Z","updated_at":"2016-03-10T01:16:33Z","pushed_at":"2016-03-17T06:17:33Z","git_url":"git://github.com/bakey/flink-china-doc.git","ssh_url":"git@github.com:bakey/flink-china-doc.git","clone_url":"https://github.com/bakey/flink-china-doc.git","svn_url":"https://github.com/bakey/flink-china-doc","homepage":"http://doc.flink-china.org","size":5017,"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-17T07:43:30Z","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":5832,"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/28"},"html":{"href":"https://github.com/flink-china/flink-china-doc/pull/28"},"issue":{"href":"https://api.github.com/repos/flink-china/flink-china-doc/issues/28"},"comments":{"href":"https://api.github.com/repos/flink-china/flink-china-doc/issues/28/comments"},"review_comments":{"href":"https://api.github.com/repos/flink-china/flink-china-doc/pulls/28/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/28/commits"},"statuses":{"href":"https://api.github.com/repos/flink-china/flink-china-doc/statuses/683b700ed714923d4483d67361b0075a441455ce"}}}}