wangyang0918 commented on a change in pull request #9985:
[FLINK-10968][kubernetes] Implement TaskManager Entrypoint for Kubernetes.
URL: https://github.com/apache/flink/pull/9985#discussion_r353031884
##########
File path:
flink-yarn/src/main/java/org/apache/flink/yarn/YarnTaskExecutorRunner.java
##########
@@ -97,22 +91,7 @@ private static void run(String[] args) {
final String currDir = ENV.get(Environment.PWD.key());
LOG.info("Current working Directory: {}", currDir);
- // Some dynamic properties for task manager are added to args, such as
managed memory size.
- final CommandLineParser<ClusterConfiguration>
commandLineParser =
- new CommandLineParser<>(new
ClusterConfigurationParserFactory());
-
- ClusterConfiguration clusterConfiguration = null;
- try {
- clusterConfiguration =
commandLineParser.parse(args);
- } catch (FlinkParseException e) {
- LOG.error("Could not parse command line
arguments {}.", args, e);
-
commandLineParser.printHelp(YarnTaskExecutorRunner.class.getSimpleName());
- System.exit(1);
Review comment:
I think we should not `System.exit(1)` here. We should use
`INIT_ERROR_EXIT_CODE` instead. The exception of
`TaskManagerRunner.loadConfiguration` will be caught.
We just can not use `TaskManagerRunner#runTaskManagerSecurely` for
`YarnTaskExecutorRunner`. Because the configuration needs to be updated and
then use the updated configuration to start task executor. It is the unique
logics of Yarn.
----------------------------------------------------------------
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