YngwieWang commented on a change in pull request #9047: 
[FLINK-13109][docs-zh]Translate "Restart Strategies" page into Chinese
URL: https://github.com/apache/flink/pull/9047#discussion_r302537698
 
 

 ##########
 File path: docs/dev/restart_strategies.zh.md
 ##########
 @@ -114,63 +108,63 @@ restart-strategy: fixed-delay
 <table class="table table-bordered">
   <thead>
     <tr>
-      <th class="text-left" style="width: 40%">Configuration Parameter</th>
-      <th class="text-left" style="width: 40%">Description</th>
-      <th class="text-left">Default Value</th>
+      <th class="text-left" style="width: 40%">配置参数</th>
+      <th class="text-left" style="width: 40%">描述</th>
+      <th class="text-left">默认配置值</th>
     </tr>
   </thead>
   <tbody>
     <tr>
         <td><code>restart-strategy.fixed-delay.attempts</code></td>
-        <td>The number of times that Flink retries the execution before the 
job is declared as failed.</td>
-        <td>1, or <code>Integer.MAX_VALUE</code> if activated by 
checkpointing</td>
+        <td>作业宣告失败之前 Flink 重试执行的最大次数</td>
+        <td>启用 checkpoint 的话是 <code>Integer.MAX_VALUE</code>,否则是 1</td>
     </tr>
     <tr>
         <td><code>restart-strategy.fixed-delay.delay</code></td>
-        <td>Delaying the retry means that after a failed execution, the 
re-execution does not start immediately, but only after a certain delay. 
Delaying the retries can be helpful when the program interacts with external 
systems where for example connections or pending transactions should reach a 
timeout before re-execution is attempted.</td>
-        <td><code>akka.ask.timeout</code>, or 10s if activated by 
checkpointing</td>
+        
<td>延时重试意味着执行遭遇故障后,并不立即重新启动,而是延后一段时间。当程序与外部系统有交互时延时重试可能会有所帮助,比如程序里有连接或者挂起的事务的话,在尝试重新执行之前应该等待连接或者挂起的事务超时。</td>
+        <td>启用 checkpoint 的话是 10 秒,否则使用 <code>akka.ask.timeout</code> 的值</td>
     </tr>
   </tbody>
 </table>
 
-For example:
+例如:
 
 {% highlight yaml %}
 restart-strategy.fixed-delay.attempts: 3
 restart-strategy.fixed-delay.delay: 10 s
 {% endhighlight %}
 
-The fixed delay restart strategy can also be set programmatically:
+固定延迟重启策略也可以在程序中设置:
 
 <div class="codetabs" markdown="1">
 <div data-lang="java" markdown="1">
 {% highlight java %}
 ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();
 env.setRestartStrategy(RestartStrategies.fixedDelayRestart(
-  3, // number of restart attempts
-  Time.of(10, TimeUnit.SECONDS) // delay
+  3, // 尝试重启的次数
+  Time.of(10, TimeUnit.SECONDS) // 延时
 ));
 {% endhighlight %}
 </div>
 <div data-lang="scala" markdown="1">
 {% highlight scala %}
 val env = ExecutionEnvironment.getExecutionEnvironment()
 env.setRestartStrategy(RestartStrategies.fixedDelayRestart(
-  3, // number of restart attempts
-  Time.of(10, TimeUnit.SECONDS) // delay
+  3, // 尝试重启的次数
+  Time.of(10, TimeUnit.SECONDS) // 延时
 ))
 {% endhighlight %}
 </div>
 </div>
 
 {% top %}
 
-### Failure Rate Restart Strategy
+### 故障率重启策略
 
-The failure rate restart strategy restarts job after failure, but when 
`failure rate` (failures per time interval) is exceeded, the job eventually 
fails.
-In-between two consecutive restart attempts, the restart strategy waits a 
fixed amount of time.
+故障率重启策略在故障发生之后重启作业,但是当**故障率**(每个时间间隔发生故障的次数)超过设定的限制时,作业会最终失败。
+在连续的两次重启尝试之间,重启策略等待一段固定长度的时间。
 
-This strategy is enabled as default by setting the following configuration 
parameter in `flink-conf.yaml`.
+通过在 flink-conf.yaml 中设置如下配置参数,默认启用此策略。
 
 Review comment:
   感谢指正,我太粗心了,以后一定翻译得更细致。

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to