[GitHub] [flink] klion26 commented on a change in pull request #8995: [FLINK-13106][doc-zh]Translate Parallel Execution page into Chinese

2019-07-09 Thread GitBox
klion26 commented on a change in pull request #8995: 
[FLINK-13106][doc-zh]Translate Parallel Execution page into Chinese
URL: https://github.com/apache/flink/pull/8995#discussion_r301858852
 
 

 ##
 File path: docs/dev/parallel.zh.md
 ##
 @@ -22,29 +22,20 @@ specific language governing permissions and limitations
 under the License.
 -->
 
-This section describes how the parallel execution of programs can be 
configured in Flink. A Flink
-program consists of multiple tasks (transformations/operators, data sources, 
and sinks). A task is split into
-several parallel instances for execution and each parallel instance processes 
a subset of the task's
-input data. The number of parallel instances of a task is called its 
*parallelism*.
-
-If you want to use [savepoints]({{ site.baseurl }}/ops/state/savepoints.html) 
you should also consider
-setting a maximum parallelism (or `max parallelism`). When restoring from a 
savepoint you can
-change the parallelism of specific operators or the whole program and this 
setting specifies
-an upper bound on the parallelism. This is required because Flink internally 
partitions state
-into key-groups and we cannot have `+Inf` number of key-groups because this 
would be detrimental
-to performance.
+本节描述了如何在 Flink 中配置程序的并发执行。一个 Flink 程序由多个任务 task 组成(转换/算子、数据源和数据汇)。一个 task 
包括多个并发执行的实例,且每一个实例都处理 task 输入数据的一个子集。一个 task 的并发实例数被称为该 task 的 *parallelism*。
 
 Review comment:
   看了上面大家说的,以及查阅了 “parallism", "concurrency" 等的翻译以及定义后,如果翻译的话,**我现在认为翻译为 "并行度" 
可能会更好一点**,”并行" 表示同一时刻都会发送,"并发" 则表示某个时间段同时发生,但是在这个时间段还是可能会有先后顺序。


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


[GitHub] [flink] klion26 commented on a change in pull request #8995: [FLINK-13106][doc-zh]Translate Parallel Execution page into Chinese

2019-07-09 Thread GitBox
klion26 commented on a change in pull request #8995: 
[FLINK-13106][doc-zh]Translate Parallel Execution page into Chinese
URL: https://github.com/apache/flink/pull/8995#discussion_r301482473
 
 

 ##
 File path: docs/dev/parallel.zh.md
 ##
 @@ -80,17 +71,11 @@ env.execute("Word Count Example")
 
 
 
-### Execution Environment Level
+### 执行环境层次
 
-As mentioned [here]({{ site.baseurl 
}}/dev/api_concepts.html#anatomy-of-a-flink-program) Flink
-programs are executed in the context of an execution environment. An
-execution environment defines a default parallelism for all operators, data 
sources, and data sinks
-it executes. Execution environment parallelism can be overwritten by 
explicitly configuring the
-parallelism of an operator.
+如[此节]({{ site.baseurl 
}}/zh/dev/api_concepts.html#anatomy-of-a-flink-program)所描述,Flink 
程序运行在执行环境的上下文中。执行环境为所有执行的算子、数据源、数据汇定义了一个默认的 parallelism。可以显式配置算子层次的 parallelism 
去覆盖执行环境的 parallelism。
 
-The default parallelism of an execution environment can be specified by 
calling the
-`setParallelism()` method. To execute all operators, data sources, and data 
sinks with a parallelism
-of `3`, set the default parallelism of the execution environment as follows:
+执行环境的默认 parallelism 可以通过调用 `setParallelism()` 方法指定。可以通过如下的方式设置执行环境的 
parallelism,以并发度 `3`来执行所有的算子、数据源和数据汇:
 
 Review comment:
   这个地方我认为 sink 需要翻译,和 source 对齐,对于翻译的中文,我没有偏好


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


[GitHub] [flink] klion26 commented on a change in pull request #8995: [FLINK-13106][doc-zh]Translate Parallel Execution page into Chinese

2019-07-09 Thread GitBox
klion26 commented on a change in pull request #8995: 
[FLINK-13106][doc-zh]Translate Parallel Execution page into Chinese
URL: https://github.com/apache/flink/pull/8995#discussion_r301481947
 
 

 ##
 File path: docs/dev/parallel.zh.md
 ##
 @@ -22,29 +22,20 @@ specific language governing permissions and limitations
 under the License.
 -->
 
-This section describes how the parallel execution of programs can be 
configured in Flink. A Flink
-program consists of multiple tasks (transformations/operators, data sources, 
and sinks). A task is split into
-several parallel instances for execution and each parallel instance processes 
a subset of the task's
-input data. The number of parallel instances of a task is called its 
*parallelism*.
-
-If you want to use [savepoints]({{ site.baseurl }}/ops/state/savepoints.html) 
you should also consider
-setting a maximum parallelism (or `max parallelism`). When restoring from a 
savepoint you can
-change the parallelism of specific operators or the whole program and this 
setting specifies
-an upper bound on the parallelism. This is required because Flink internally 
partitions state
-into key-groups and we cannot have `+Inf` number of key-groups because this 
would be detrimental
-to performance.
+本节描述了如何在 Flink 中配置程序的并发执行。一个 Flink 程序由多个任务 task 组成(转换/算子、数据源和数据汇)。一个 task 
包括多个并发执行的实例,且每一个实例都处理 task 输入数据的一个子集。一个 task 的并发实例数被称为该 task 的 *parallelism*。
 
 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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [flink] klion26 commented on a change in pull request #8995: FLINK-13106][doc-zh]Translate Parallel Execution page into Chinese

2019-07-08 Thread GitBox
klion26 commented on a change in pull request #8995: 
FLINK-13106][doc-zh]Translate Parallel Execution page into Chinese
URL: https://github.com/apache/flink/pull/8995#discussion_r301172492
 
 

 ##
 File path: docs/dev/parallel.zh.md
 ##
 @@ -168,26 +168,7 @@ try {
 
 最大 parallelism 可以在所有设置 parallelism 的地方进行设定(客户端和系统层次除外)。与调用 `setParallelism()` 
方法修改并发度相似,你可以通过调用 `setMaxParallelism()` 方法来设定最大 parallelism。
 
-默认的最大 parallelism 等于将 operatorParallelism + (operatorParallelism / 2) 值舍入到其下一个 
`2` 的幂次方的值,其计算方式如以下所示。
-
-{% highlight scala %}
-   /**
-* Round the given number to the next power of two.
-* @param x number is the value  of 'operatorParallelism + 
(operatorParallelism / 2)'
-* @return x rounded up to the next power of two
-*/
-   public static int roundUpToPowerOfTwo(int x) {
-   x = x - 1;
-   x |= x >> 1;
-   x |= x >> 2;
-   x |= x >> 4;
-   x |= x >> 8;
-   x |= x >> 16;
-   return x + 1;
-   }
-{% endhighlight %}
-
-注意,默认最大 parallelism 下限为 `128`,上限为 `32768`。
+默认的最大 parallelism 等于将 `operatorParallelism + (operatorParallelism / 2)` 
值四舍五入到大于等于该值的一个整型值,并且这个整型值是 `2` 的幂次方,注意默认最大 parallelism 下限为 `128`,上限为 `32768`。
 
 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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [flink] klion26 commented on a change in pull request #8995: FLINK-13106][doc-zh]Translate Parallel Execution page into Chinese

2019-07-07 Thread GitBox
klion26 commented on a change in pull request #8995: 
FLINK-13106][doc-zh]Translate Parallel Execution page into Chinese
URL: https://github.com/apache/flink/pull/8995#discussion_r300919771
 
 

 ##
 File path: docs/dev/parallel.zh.md
 ##
 @@ -177,25 +159,37 @@ try {
 
 
 
-### System Level
+### 系统层次
+
+可以通过设置 `./conf/flink-conf.yaml` 文件中的 `parallelism.default` 
参数,在系统层次来指定所有执行环境的默认 parallelism。你可以通过查阅[配置文档]({{ site.baseurl 
}}/zh/ops/config.html)获取更多细节。
+
 
-A system-wide default parallelism for all execution environments can be 
defined by setting the
-`parallelism.default` property in `./conf/flink-conf.yaml`. See the
-[Configuration]({{ site.baseurl }}/ops/config.html) documentation for details.
+## 设置最大并发度
 
-## Setting the Maximum Parallelism
+最大 parallelism 可以在所有设置 parallelism 的地方进行设定(客户端和系统层次除外)。与调用 `setParallelism()` 
方法修改并发度相似,你可以通过调用 `setMaxParallelism()` 方法来设定最大 parallelism。
 
-The maximum parallelism can be set in places where you can also set a 
parallelism
-(except client level and system level). Instead of calling `setParallelism()` 
you call
-`setMaxParallelism()` to set the maximum parallelism.
+默认的最大 parallelism 等于将 operatorParallelism + (operatorParallelism / 2) 值舍入到其下一个 
`2` 的幂次方的值,其计算方式如以下所示。
 
 Review comment:
   ```suggestion
   默认的最大 parallelism 等于将 `operatorParallelism + (operatorParallelism / 2)` 
值舍入到其下一个 `2` 的幂次方的值,其计算方式如以下所示。
   ```
   I think the current translation is better than the previous, and maybe we 
could do it better here. 
   
   "默认的最大 parallelism 等于将 operatorParallelism + (operatorParallelism / 2) 
值舍入到其下一个 `2` 的幂次方的值" 读起来有一点拗口
   
   I don't think we need to attach the code here.


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


[GitHub] [flink] klion26 commented on a change in pull request #8995: FLINK-13106][doc-zh]Translate Parallel Execution page into Chinese

2019-07-07 Thread GitBox
klion26 commented on a change in pull request #8995: 
FLINK-13106][doc-zh]Translate Parallel Execution page into Chinese
URL: https://github.com/apache/flink/pull/8995#discussion_r300851411
 
 

 ##
 File path: docs/dev/parallel.zh.md
 ##
 @@ -177,25 +159,19 @@ try {
 
 
 
-### System Level
+### 系统层次
+
+可以通过设置 ./conf/flink-conf.yaml 文件中的 parallelism.default 参数,在系统层次来指定所有执行环境的默认 
parallelism。你可以通过查阅[配置文档]({{ site.baseurl }}/zh/ops/config.html)获取更多细节。
 
-A system-wide default parallelism for all execution environments can be 
defined by setting the
-`parallelism.default` property in `./conf/flink-conf.yaml`. See the
-[Configuration]({{ site.baseurl }}/ops/config.html) documentation for details.
 
-## Setting the Maximum Parallelism
+## 设置最大并发度
 
-The maximum parallelism can be set in places where you can also set a 
parallelism
-(except client level and system level). Instead of calling `setParallelism()` 
you call
-`setMaxParallelism()` to set the maximum parallelism.
+最大 parallelism 可以在所有设置 parallelism 的地方进行设定(除了客户端和系统层次)。与调用 `setParallelism()` 
方法修改并发度相似,你可以通过调用 `setMaxParallelism()` 方法来设定最大 parallelism。
 
-The default setting for the maximum parallelism is roughly 
`operatorParallelism + (operatorParallelism / 2)` with
-a lower bound of `127` and an upper bound of `32768`.
+默认的最大 parallelism 大致等于算子的 parallelism + 算子的
+parallelism/2,其下限为 128,上限为 32768。
 
 Review comment:
   ```suggestion
   parallelism/2,其下限为 `128`,上限为 `32768`。
   ```


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


[GitHub] [flink] klion26 commented on a change in pull request #8995: FLINK-13106][doc-zh]Translate Parallel Execution page into Chinese

2019-07-07 Thread GitBox
klion26 commented on a change in pull request #8995: 
FLINK-13106][doc-zh]Translate Parallel Execution page into Chinese
URL: https://github.com/apache/flink/pull/8995#discussion_r300851239
 
 

 ##
 File path: docs/dev/parallel.zh.md
 ##
 @@ -22,29 +22,20 @@ specific language governing permissions and limitations
 under the License.
 -->
 
-This section describes how the parallel execution of programs can be 
configured in Flink. A Flink
-program consists of multiple tasks (transformations/operators, data sources, 
and sinks). A task is split into
-several parallel instances for execution and each parallel instance processes 
a subset of the task's
-input data. The number of parallel instances of a task is called its 
*parallelism*.
-
-If you want to use [savepoints]({{ site.baseurl }}/ops/state/savepoints.html) 
you should also consider
-setting a maximum parallelism (or `max parallelism`). When restoring from a 
savepoint you can
-change the parallelism of specific operators or the whole program and this 
setting specifies
-an upper bound on the parallelism. This is required because Flink internally 
partitions state
-into key-groups and we cannot have `+Inf` number of key-groups because this 
would be detrimental
-to performance.
+本节描述了如何在 Flink 中配置程序的并发执行。一个 Flink 程序由多个任务 task 组成(转换/算子、数据源和数据汇)。一个 task 
包括多个并发执行的实例,且每一个实例都处理 task 输入数据的一个子集。一个 task 的并发实例数被称为该 task 的 *parallelism*。
+
+使用 [savepoints]({{ site.baseurl }}/zh/ops/state/savepoints.html) 时,应该考虑设置最大 
parallelism。当作业从一个 savepoint 恢复时,你可以改变特定算子或着整个程序的 parallelism,并且此设置会限定整个程序的 
parallelism 的上限。由于在 Flink 内部将状态划分为了 key-groups,且性能所限不能无限制地增加 key-groups ,因此设定最大 
parallelism 是有必要的。
 
 * toc
 {:toc}
 
-## Setting the Parallelism
+## 设置 Parallelism
 
-The parallelism of a task can be specified in Flink on different levels:
+一个 task 的 parallelism 可以从多个层次指定:
 
-### Operator Level
+### 算子层次
 
-The parallelism of an individual operator, data source, or data sink can be 
defined by calling its
-`setParallelism()` method.  For example, like this:
+单个算子、数据源和数据流出的 parallelism 可以通过调用 `setParallelism()` 方法来指定。如下所示:
 
 Review comment:
   `数据流出` can be improved, and other places also


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


[GitHub] [flink] klion26 commented on a change in pull request #8995: FLINK-13106][doc-zh]Translate Parallel Execution page into Chinese

2019-07-07 Thread GitBox
klion26 commented on a change in pull request #8995: 
FLINK-13106][doc-zh]Translate Parallel Execution page into Chinese
URL: https://github.com/apache/flink/pull/8995#discussion_r300851404
 
 

 ##
 File path: docs/dev/parallel.zh.md
 ##
 @@ -177,25 +159,19 @@ try {
 
 
 
-### System Level
+### 系统层次
+
+可以通过设置 ./conf/flink-conf.yaml 文件中的 parallelism.default 参数,在系统层次来指定所有执行环境的默认 
parallelism。你可以通过查阅[配置文档]({{ site.baseurl }}/zh/ops/config.html)获取更多细节。
 
-A system-wide default parallelism for all execution environments can be 
defined by setting the
-`parallelism.default` property in `./conf/flink-conf.yaml`. See the
-[Configuration]({{ site.baseurl }}/ops/config.html) documentation for details.
 
-## Setting the Maximum Parallelism
+## 设置最大并发度
 
-The maximum parallelism can be set in places where you can also set a 
parallelism
-(except client level and system level). Instead of calling `setParallelism()` 
you call
-`setMaxParallelism()` to set the maximum parallelism.
+最大 parallelism 可以在所有设置 parallelism 的地方进行设定(除了客户端和系统层次)。与调用 `setParallelism()` 
方法修改并发度相似,你可以通过调用 `setMaxParallelism()` 方法来设定最大 parallelism。
 
-The default setting for the maximum parallelism is roughly 
`operatorParallelism + (operatorParallelism / 2)` with
-a lower bound of `127` and an upper bound of `32768`.
+默认的最大 parallelism 大致等于算子的 parallelism + 算子的
 
 Review comment:
   maybe we can let `operatorParallelism + (operatorParallelism / 2)` as it is?
   
   can we translate this sentence according to the code? so that, users can 
directly know how to calculate the default parallelism from the doc.


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


[GitHub] [flink] klion26 commented on a change in pull request #8995: FLINK-13106][doc-zh]Translate Parallel Execution page into Chinese

2019-07-07 Thread GitBox
klion26 commented on a change in pull request #8995: 
FLINK-13106][doc-zh]Translate Parallel Execution page into Chinese
URL: https://github.com/apache/flink/pull/8995#discussion_r300851293
 
 

 ##
 File path: docs/dev/parallel.zh.md
 ##
 @@ -177,25 +159,19 @@ try {
 
 
 
-### System Level
+### 系统层次
+
+可以通过设置 ./conf/flink-conf.yaml 文件中的 parallelism.default 参数,在系统层次来指定所有执行环境的默认 
parallelism。你可以通过查阅[配置文档]({{ site.baseurl }}/zh/ops/config.html)获取更多细节。
 
 Review comment:
   ```suggestion
   可以通过设置 `./conf/flink-conf.yaml` 文件中的 `parallelism.default` 
参数,在系统层次来指定所有执行环境的默认 parallelism。你可以通过查阅[配置文档]({{ site.baseurl 
}}/zh/ops/config.html)获取更多细节。
   ```


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


[GitHub] [flink] klion26 commented on a change in pull request #8995: FLINK-13106][doc-zh]Translate Parallel Execution page into Chinese

2019-07-07 Thread GitBox
klion26 commented on a change in pull request #8995: 
FLINK-13106][doc-zh]Translate Parallel Execution page into Chinese
URL: https://github.com/apache/flink/pull/8995#discussion_r300851214
 
 

 ##
 File path: docs/dev/parallel.zh.md
 ##
 @@ -22,29 +22,20 @@ specific language governing permissions and limitations
 under the License.
 -->
 
-This section describes how the parallel execution of programs can be 
configured in Flink. A Flink
-program consists of multiple tasks (transformations/operators, data sources, 
and sinks). A task is split into
-several parallel instances for execution and each parallel instance processes 
a subset of the task's
-input data. The number of parallel instances of a task is called its 
*parallelism*.
-
-If you want to use [savepoints]({{ site.baseurl }}/ops/state/savepoints.html) 
you should also consider
-setting a maximum parallelism (or `max parallelism`). When restoring from a 
savepoint you can
-change the parallelism of specific operators or the whole program and this 
setting specifies
-an upper bound on the parallelism. This is required because Flink internally 
partitions state
-into key-groups and we cannot have `+Inf` number of key-groups because this 
would be detrimental
-to performance.
+本节描述了如何在 Flink 中配置程序的并发执行。一个 Flink 程序由多个任务 task 组成(转换/算子、数据源和数据汇)。一个 task 
包括多个并发执行的实例,且每一个实例都处理 task 输入数据的一个子集。一个 task 的并发实例数被称为该 task 的 *parallelism*。
+
+使用 [savepoints]({{ site.baseurl }}/zh/ops/state/savepoints.html) 时,应该考虑设置最大 
parallelism。当作业从一个 savepoint 恢复时,你可以改变特定算子或着整个程序的 parallelism,并且此设置会限定整个程序的 
parallelism 的上限。由于在 Flink 内部将状态划分为了 key-groups,且性能所限不能无限制地增加 key-groups ,因此设定最大 
parallelism 是有必要的。
 
 Review comment:
   ```suggestion
   使用 [savepoints]({{ site.baseurl }}/zh/ops/state/savepoints.html) 时,应该考虑设置最大 
parallelism。当作业从一个 savepoint 恢复时,你可以改变特定算子或着整个程序的 parallelism,并且此设置会限定整个程序的 
parallelism 的上限。由于在 Flink 内部将状态划分为了 key-groups,且性能所限不能无限制地增加 key-groups,因此设定最大 
parallelism 是有必要的。
   ```


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


[GitHub] [flink] klion26 commented on a change in pull request #8995: FLINK-13106][doc-zh]Translate Parallel Execution page into Chinese

2019-07-07 Thread GitBox
klion26 commented on a change in pull request #8995: 
FLINK-13106][doc-zh]Translate Parallel Execution page into Chinese
URL: https://github.com/apache/flink/pull/8995#discussion_r300851335
 
 

 ##
 File path: docs/dev/parallel.zh.md
 ##
 @@ -177,25 +159,19 @@ try {
 
 
 
-### System Level
+### 系统层次
+
+可以通过设置 ./conf/flink-conf.yaml 文件中的 parallelism.default 参数,在系统层次来指定所有执行环境的默认 
parallelism。你可以通过查阅[配置文档]({{ site.baseurl }}/zh/ops/config.html)获取更多细节。
 
-A system-wide default parallelism for all execution environments can be 
defined by setting the
-`parallelism.default` property in `./conf/flink-conf.yaml`. See the
-[Configuration]({{ site.baseurl }}/ops/config.html) documentation for details.
 
-## Setting the Maximum Parallelism
+## 设置最大并发度
 
-The maximum parallelism can be set in places where you can also set a 
parallelism
-(except client level and system level). Instead of calling `setParallelism()` 
you call
-`setMaxParallelism()` to set the maximum parallelism.
+最大 parallelism 可以在所有设置 parallelism 的地方进行设定(除了客户端和系统层次)。与调用 `setParallelism()` 
方法修改并发度相似,你可以通过调用 `setMaxParallelism()` 方法来设定最大 parallelism。
 
 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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [flink] klion26 commented on a change in pull request #8995: FLINK-13106][doc-zh]Translate Parallel Execution page into Chinese

2019-07-06 Thread GitBox
klion26 commented on a change in pull request #8995: 
FLINK-13106][doc-zh]Translate Parallel Execution page into Chinese
URL: https://github.com/apache/flink/pull/8995#discussion_r300824439
 
 

 ##
 File path: docs/dev/parallel.zh.md
 ##
 @@ -22,29 +22,20 @@ specific language governing permissions and limitations
 under the License.
 -->
 
-This section describes how the parallel execution of programs can be 
configured in Flink. A Flink
-program consists of multiple tasks (transformations/operators, data sources, 
and sinks). A task is split into
-several parallel instances for execution and each parallel instance processes 
a subset of the task's
-input data. The number of parallel instances of a task is called its 
*parallelism*.
-
-If you want to use [savepoints]({{ site.baseurl }}/ops/state/savepoints.html) 
you should also consider
-setting a maximum parallelism (or `max parallelism`). When restoring from a 
savepoint you can
-change the parallelism of specific operators or the whole program and this 
setting specifies
-an upper bound on the parallelism. This is required because Flink internally 
partitions state
-into key-groups and we cannot have `+Inf` number of key-groups because this 
would be detrimental
-to performance.
+本节描述了如何在 Flink 中配置程序的并发执行。一个 Flink 程序由多个任务 task 组成(转换/算子、数据源和数据流出)。一个 task 
包括多个并发执行的实例,且每一个实例都处理某个 task 输入数据的一个子集。一个 task 的并发实例数被称为该 task 的 parallelism。
 
 Review comment:
   personally, "流出" is more like a verb other than a noun.


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


[GitHub] [flink] klion26 commented on a change in pull request #8995: FLINK-13106][doc-zh]Translate Parallel Execution page into Chinese

2019-07-05 Thread GitBox
klion26 commented on a change in pull request #8995: 
FLINK-13106][doc-zh]Translate Parallel Execution page into Chinese
URL: https://github.com/apache/flink/pull/8995#discussion_r300818504
 
 

 ##
 File path: docs/dev/parallel.zh.md
 ##
 @@ -80,17 +71,11 @@ env.execute("Word Count Example")
 
 
 
-### Execution Environment Level
+### 执行环境层次
 
-As mentioned [here]({{ site.baseurl 
}}/dev/api_concepts.html#anatomy-of-a-flink-program) Flink
-programs are executed in the context of an execution environment. An
-execution environment defines a default parallelism for all operators, data 
sources, and data sinks
-it executes. Execution environment parallelism can be overwritten by 
explicitly configuring the
-parallelism of an operator.
+如[此节]({{ site.baseurl }}/zh/dev/api_concepts.html#anatomy-of-a-flink-program) 
所描述,Flink 程序运行在执行环境的上下文中。执行环境为所有执行的算子、数据源、数据流出定义了一个默认的 parallelism。可以显式配置算子层次的 
parallelism 去覆盖执行环境的parallelism。
 
 Review comment:
   ```suggestion
   如[此节]({{ site.baseurl 
}}/zh/dev/api_concepts.html#anatomy-of-a-flink-program)所描述,Flink 
程序运行在执行环境的上下文中。执行环境为所有执行的算子、数据源、数据流出定义了一个默认的 parallelism。可以显式配置算子层次的 
parallelism 去覆盖执行环境的 parallelism。
   ```


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


[GitHub] [flink] klion26 commented on a change in pull request #8995: FLINK-13106][doc-zh]Translate Parallel Execution page into Chinese

2019-07-05 Thread GitBox
klion26 commented on a change in pull request #8995: 
FLINK-13106][doc-zh]Translate Parallel Execution page into Chinese
URL: https://github.com/apache/flink/pull/8995#discussion_r300818962
 
 

 ##
 File path: docs/dev/parallel.zh.md
 ##
 @@ -177,25 +159,18 @@ try {
 
 
 
-### System Level
+### 系统层次
 
-A system-wide default parallelism for all execution environments can be 
defined by setting the
-`parallelism.default` property in `./conf/flink-conf.yaml`. See the
-[Configuration]({{ site.baseurl }}/ops/config.html) documentation for details.
+可以通过设置 ./conf/flink-conf.yaml 文件中的 parallelism.default 参数,在系统层次来指定所有执行环境的默认 
parallelism。你可以通过查阅 [配置文档]({{ site.baseurl }}/zh/ops/config.html) 获取更多细节。
 
 Review comment:
   ```suggestion
   可以通过设置 ./conf/flink-conf.yaml 文件中的 parallelism.default 参数,在系统层次来指定所有执行环境的默认 
parallelism。你可以通过查阅[配置文档]({{ site.baseurl }}/zh/ops/config.html)获取更多细节。
   ```


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


[GitHub] [flink] klion26 commented on a change in pull request #8995: FLINK-13106][doc-zh]Translate Parallel Execution page into Chinese

2019-07-05 Thread GitBox
klion26 commented on a change in pull request #8995: 
FLINK-13106][doc-zh]Translate Parallel Execution page into Chinese
URL: https://github.com/apache/flink/pull/8995#discussion_r300818439
 
 

 ##
 File path: docs/dev/parallel.zh.md
 ##
 @@ -22,29 +22,20 @@ specific language governing permissions and limitations
 under the License.
 -->
 
-This section describes how the parallel execution of programs can be 
configured in Flink. A Flink
-program consists of multiple tasks (transformations/operators, data sources, 
and sinks). A task is split into
-several parallel instances for execution and each parallel instance processes 
a subset of the task's
-input data. The number of parallel instances of a task is called its 
*parallelism*.
-
-If you want to use [savepoints]({{ site.baseurl }}/ops/state/savepoints.html) 
you should also consider
-setting a maximum parallelism (or `max parallelism`). When restoring from a 
savepoint you can
-change the parallelism of specific operators or the whole program and this 
setting specifies
-an upper bound on the parallelism. This is required because Flink internally 
partitions state
-into key-groups and we cannot have `+Inf` number of key-groups because this 
would be detrimental
-to performance.
+本节描述了如何在 Flink 中配置程序的并发执行。一个 Flink 程序由多个任务 task 组成(转换/算子、数据源和数据流出)。一个 task 
包括多个并发执行的实例,且每一个实例都处理某个 task 输入数据的一个子集。一个 task 的并发实例数被称为该 task 的 parallelism。
+
+使用 [savepoints]({{ site.baseurl }}/zh/ops/state/savepoints.html) 时,应该考虑设置最大 
parallelism。当作业从一个 savepoint 恢复时,你可以改变特定算子或着整个程序的 parallelism,并且此设置会限定 
parallelism 的上限。由于在 Flink 内部将状态划分为了 key-groups,且性能所限不能无限制地增加 key-groups ,因此设定最大 
parallelism 是有必要的。
 
 Review comment:
   `并且此设置会限定 parallelism 的上限` --> `并且此设置会限定整个程序的 parallelism 上限`?
   
   `key-groups ,因此设定最大 parallelism 是有必要的` -> `key-groups,因此设定最大 parallelism 
是有必要的`


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


[GitHub] [flink] klion26 commented on a change in pull request #8995: FLINK-13106][doc-zh]Translate Parallel Execution page into Chinese

2019-07-05 Thread GitBox
klion26 commented on a change in pull request #8995: 
FLINK-13106][doc-zh]Translate Parallel Execution page into Chinese
URL: https://github.com/apache/flink/pull/8995#discussion_r300818614
 
 

 ##
 File path: docs/dev/parallel.zh.md
 ##
 @@ -177,25 +159,18 @@ try {
 
 
 
-### System Level
+### 系统层次
 
-A system-wide default parallelism for all execution environments can be 
defined by setting the
-`parallelism.default` property in `./conf/flink-conf.yaml`. See the
-[Configuration]({{ site.baseurl }}/ops/config.html) documentation for details.
+可以通过设置 ./conf/flink-conf.yaml 文件中的 parallelism.default 参数,在系统层次来指定所有执行环境的默认 
parallelism。你可以通过查阅 [配置文档]({{ site.baseurl }}/zh/ops/config.html) 获取更多细节。
+获取更多细节。
 
-## Setting the Maximum Parallelism
+## 设置最大并发度
 
-The maximum parallelism can be set in places where you can also set a 
parallelism
-(except client level and system level). Instead of calling `setParallelism()` 
you call
-`setMaxParallelism()` to set the maximum parallelism.
+最大 parallelism 可以在所有设置 parallelism 的地方进行设定(除了客户端和系统层次)。与调用 `setParallelism()` 
方法修改并发度相似,你可以通过调用 `setMaxParallelism()` 方法来设定最大 parallelism。
 
-The default setting for the maximum parallelism is roughly 
`operatorParallelism + (operatorParallelism / 2)` with
-a lower bound of `127` and an upper bound of `32768`.
+默认的最大 parallelism 大致等于算子的 parallelism + 算子的 parallelism/2,其下限为 127,上限为 32768。
 
 Review comment:
   This sentence can be improved, please ref the 
[code](https://github.com/apache/flink/blob/6d7a15e328e8af6f001d6191c3f167bd8038bf14/flink-runtime/src/main/java/org/apache/flink/runtime/state/KeyGroupRangeAssignment.java#L127)
 for more information
   
   the lower bound is `128` instead of `127`, please update the English doc 
also.


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


[GitHub] [flink] klion26 commented on a change in pull request #8995: FLINK-13106][doc-zh]Translate Parallel Execution page into Chinese

2019-07-05 Thread GitBox
klion26 commented on a change in pull request #8995: 
FLINK-13106][doc-zh]Translate Parallel Execution page into Chinese
URL: https://github.com/apache/flink/pull/8995#discussion_r300818330
 
 

 ##
 File path: docs/dev/parallel.zh.md
 ##
 @@ -22,29 +22,20 @@ specific language governing permissions and limitations
 under the License.
 -->
 
-This section describes how the parallel execution of programs can be 
configured in Flink. A Flink
-program consists of multiple tasks (transformations/operators, data sources, 
and sinks). A task is split into
-several parallel instances for execution and each parallel instance processes 
a subset of the task's
-input data. The number of parallel instances of a task is called its 
*parallelism*.
-
-If you want to use [savepoints]({{ site.baseurl }}/ops/state/savepoints.html) 
you should also consider
-setting a maximum parallelism (or `max parallelism`). When restoring from a 
savepoint you can
-change the parallelism of specific operators or the whole program and this 
setting specifies
-an upper bound on the parallelism. This is required because Flink internally 
partitions state
-into key-groups and we cannot have `+Inf` number of key-groups because this 
would be detrimental
-to performance.
+本节描述了如何在 Flink 中配置程序的并发执行。一个 Flink 程序由多个任务 task 组成(转换/算子、数据源和数据流出)。一个 task 
包括多个并发执行的实例,且每一个实例都处理某个 task 输入数据的一个子集。一个 task 的并发实例数被称为该 task 的 parallelism。
 
 Review comment:
   `且每一个实例都处理某个 task 输入数据的一个子集` --> `且每一个实例都处理 task 输入数据的一个子集`?
   `一个 task 的并发实例数被称为该 task 的 parallelism` --> `并发实例的数目称为 task 的 *parallelism *`
   
   Maybe `sink` can be translated to `XX 汇`? 


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


[GitHub] [flink] klion26 commented on a change in pull request #8995: FLINK-13106][doc-zh]Translate Parallel Execution page into Chinese

2019-07-05 Thread GitBox
klion26 commented on a change in pull request #8995: 
FLINK-13106][doc-zh]Translate Parallel Execution page into Chinese
URL: https://github.com/apache/flink/pull/8995#discussion_r300818711
 
 

 ##
 File path: docs/dev/parallel.zh.md
 ##
 @@ -177,25 +159,18 @@ try {
 
 
 
-### System Level
+### 系统层次
 
-A system-wide default parallelism for all execution environments can be 
defined by setting the
-`parallelism.default` property in `./conf/flink-conf.yaml`. See the
-[Configuration]({{ site.baseurl }}/ops/config.html) documentation for details.
+可以通过设置 ./conf/flink-conf.yaml 文件中的 parallelism.default 参数,在系统层次来指定所有执行环境的默认 
parallelism。你可以通过查阅 [配置文档]({{ site.baseurl }}/zh/ops/config.html) 获取更多细节。
+获取更多细节。
 
-## Setting the Maximum Parallelism
+## 设置最大并发度
 
-The maximum parallelism can be set in places where you can also set a 
parallelism
-(except client level and system level). Instead of calling `setParallelism()` 
you call
-`setMaxParallelism()` to set the maximum parallelism.
+最大 parallelism 可以在所有设置 parallelism 的地方进行设定(除了客户端和系统层次)。与调用 `setParallelism()` 
方法修改并发度相似,你可以通过调用 `setMaxParallelism()` 方法来设定最大 parallelism。
 
-The default setting for the maximum parallelism is roughly 
`operatorParallelism + (operatorParallelism / 2)` with
-a lower bound of `127` and an upper bound of `32768`.
+默认的最大 parallelism 大致等于算子的 parallelism + 算子的 parallelism/2,其下限为 127,上限为 32768。
 
-Attention Setting the maximum 
parallelism to a very large
-value can be detrimental to performance because some state backends have to 
keep internal data
-structures that scale with the number of key-groups (which are the internal 
implementation mechanism for
-rescalable state).
+注意 为最大 parallelism 
设置一个非常大的值将会降低性能,因为一些 state backends 需要维持内部的数据结构,而这些数据结构将会随着 key-groups 
的数目而扩张(key-groups 是 rescalable state 内部实现机制)
 
 Review comment:
   maybe `key-groups 是 rescalable state 内部实现机制` can be improved to `key-group 
是状态重新分配的最小单元`


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