xintongsong commented on a change in pull request #11545: 
[FLINK-16742][runtime][dist] Extend and use BashJavaUtils to start JM JVM 
process and pass JVM memory args
URL: https://github.com/apache/flink/pull/11545#discussion_r401317472
 
 

 ##########
 File path: 
flink-container/src/main/java/org/apache/flink/container/entrypoint/StandaloneJobClusterEntryPoint.java
 ##########
 @@ -116,6 +107,20 @@ public static void main(String[] args) {
                ClusterEntrypoint.runClusterEntrypoint(entrypoint);
        }
 
+       public static StandaloneJobClusterConfiguration 
getEntrypointClusterConfiguration(String[] args) {
+               final CommandLineParser<StandaloneJobClusterConfiguration> 
commandLineParser = new CommandLineParser<>(new 
StandaloneJobClusterConfigurationParserFactory());
 
 Review comment:
   It is true that we only need `CONFIG_DIR_OPTION` and 
`DYNAMIC_PROPERTY_OPTION` for memory configuration. The problem is that, 
different `ParserFactories` have different set of command line options, and a 
parser will stop parsing once it sees a un-recognized token, dropping the rest 
of the arguments.
   
   E.g., `JOB_ID_OPTION` is added in 
`StandaloneJobClusterConfigurationParserFactory` but not 
`EntrypointClusterConfigurationParserFactory`. If the 
`StandaloneJobClusterEntryPoint` is launched with a `-jid` followed by a `-D 
property=value`, a parser created by 
`EntrypointClusterConfigurationParserFactory` will stop parsing when it sees 
`-jid` because it doesn't recognize it as an option, thus the dynamic property 
will not be parsed.
   
   It is true that we have not passed the command line options to the bash 
utils. But I think we have agreed to do so in FLINK-16874.
   
   I think moving `BashJavaUtils` is a good idea. Thanks for the suggestion, 
I'll try it out.

----------------------------------------------------------------
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