ye-lun commented on a change in pull request #8943: [FLINK-11637][doc-zh]Translate Checkpoints page into Chinese URL: https://github.com/apache/flink/pull/8943#discussion_r300216656
########## File path: docs/ops/state/checkpoints.zh.md ########## @@ -26,69 +26,49 @@ under the License. * toc {:toc} -## Overview +## 概述 +checkpoint 使 Flink 的状态具有良好的容错性,通过 checkpoint 机制,Flink 可以对作业的状态和计算位置进行恢复。 -Checkpoints make state in Flink fault tolerant by allowing state and the -corresponding stream positions to be recovered, thereby giving the application -the same semantics as a failure-free execution. +参考 [Checkpointing]({{ site.baseurl }}/zh/dev/stream/state/checkpointing.html) 查看如何在 Flink 程序中开启和配置 checkpoint。 -See [Checkpointing]({{ site.baseurl }}/dev/stream/state/checkpointing.html) for how to enable and -configure checkpoints for your program. +## 保留 Checkpoint -## Retained Checkpoints - -Checkpoints are by default not retained and are only used to resume a -job from failures. They are deleted when a program is cancelled. -You can, however, configure periodic checkpoints to be retained. -Depending on the configuration these *retained* checkpoints are *not* -automatically cleaned up when the job fails or is canceled. -This way, you will have a checkpoint around to resume from if your job fails. +checkpoint 在默认的情况下仅用于恢复失败的作业,并不保留,当程序取消时 checkpoint 就会被删除。当然,你可以通过配置来保留 checkpoint,这些被保留的 checkpoint 在作业失败或取消时不会被清除。这样,你就可以使用该 checkpoint 来恢复失败的作业。 {% highlight java %} CheckpointConfig config = env.getCheckpointConfig(); config.enableExternalizedCheckpoints(ExternalizedCheckpointCleanup.RETAIN_ON_CANCELLATION); {% endhighlight %} -The `ExternalizedCheckpointCleanup` mode configures what happens with checkpoints when you cancel the job: - -- **`ExternalizedCheckpointCleanup.RETAIN_ON_CANCELLATION`**: Retain the checkpoint when the job is cancelled. Note that you have to manually clean up the checkpoint state after cancellation in this case. - -- **`ExternalizedCheckpointCleanup.DELETE_ON_CANCELLATION`**: Delete the checkpoint when the job is cancelled. The checkpoint state will only be available if the job fails. +`ExternalizedCheckpointCleanup` 配置项定义了当作业取消时,对作业 checkpoint 的操作: +- **`ExternalizedCheckpointCleanup.RETAIN_ON_CANCELLATION`**:当作业取消时,保留作业的 checkpoint。注意,这种情况下,需要手动清除该作业的 checkpoint。 Review comment: @klion26 I agree with you on this point, I will modify these and force push again because there exist many commits,thanks ---------------------------------------------------------------- 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 With regards, Apache Git Services