zuoniduimian commented on a change in pull request #16490:
URL: https://github.com/apache/flink/pull/16490#discussion_r675352570
##########
File path: docs/content.zh/docs/dev/datastream/application_parameters.md
##########
@@ -124,18 +118,17 @@ ParameterTool parameters = ParameterTool.fromArgs(args);
final ExecutionEnvironment env =
ExecutionEnvironment.getExecutionEnvironment();
env.getConfig().setGlobalJobParameters(parameters);
```
-
-Access them in any rich user function:
+在任意富函数中访问参数:
```java
public static final class Tokenizer extends RichFlatMapFunction<String,
Tuple2<String, Integer>> {
@Override
public void flatMap(String value, Collector<Tuple2<String, Integer>> out) {
- ParameterTool parameters = (ParameterTool)
- getRuntimeContext().getExecutionConfig().getGlobalJobParameters();
- parameters.getRequired("input");
- // .. do more ..
+ ParameterTool parameters = (ParameterTool)
+
getRuntimeContext().getExecutionConfig().getGlobalJobParameters();
Review comment:
There's really no problem 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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]