RollsBean commented on a change in pull request #16490:
URL: https://github.com/apache/flink/pull/16490#discussion_r675347165
##########
File path: docs/content.zh/docs/dev/datastream/application_parameters.md
##########
@@ -93,29 +88,28 @@ parameter.getNumberOfParameters()
// .. there are more methods available.
```
-You can use the return values of these methods directly in the `main()` method
of the client submitting the application.
-For example, you could set the parallelism of a operator like this:
+你可以在提交应用程序时直接在客户端的 `main()` 方法中使用这些方法的返回值。例如,你可以这样设置算子的并行度:
```java
ParameterTool parameters = ParameterTool.fromArgs(args);
int parallelism = parameters.get("mapParallelism", 2);
DataStream<Tuple2<String, Integer>> counts = text.flatMap(new
Tokenizer()).setParallelism(parallelism);
```
-Since the `ParameterTool` is serializable, you can pass it to the functions
itself:
+由于 `ParameterTool` 是序列化的,你可以将其传递给函数本身:
```java
ParameterTool parameters = ParameterTool.fromArgs(args);
DataStream<Tuple2<String, Integer>> counts = text.flatMap(new
Tokenizer(parameters));
```
-and then use it inside the function for getting values from the command line.
+然后在函数内使用它以获取命令行的传递的参数。
-#### Register the parameters globally
+#### 全局注册参数
-Parameters registered as global job parameters in the `ExecutionConfig` can be
accessed as configuration values from the JobManager web interface and in all
functions defined by the user.
+从 JobManager web 界面和用户定义的所有函数中可以以配置值的方式访问在 `ExecutionConfig` 中注册为全局作业参数。
Review comment:
...可以/ 以...的方式 / 访问(动词) / 在 `ExecutionConfig` 中注册为全局作业参数(定语) /
你看下上面句子结构,完全不通顺呀,访问后面都没有名词(宾语)
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]