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

 ##########
 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:
   The actual code to create `Configuration` is the same in all cases: TM / JM 
session / JM job mode. It uses same `CONFIG_DIR_OPTION` and 
`DYNAMIC_PROPERTY_OPTION`. Basically, `TaskManagerRunner#loadConfiguration` 
would work for all cases atm.
   
   I agree that different Flink processes may theoretically do more magic for 
the memory options in the `Configuration` and parse it differently in future. 
Not sure though how probable it is and that we want to address this now. The 
reason that there are various `ParserFactories` is that they inject some 
specific cmdline options but not memory related. The entry point specific 
options are not even passed to the bash utils. Therefore, maybe, a simpler 
solution for now is to just abstract `TaskManagerRunner#loadConfiguration` into 
some util and use it for all purposes in one `BashJavaUtils`?
   
   As I understand, introducing `StandaloneJobClusterBashJavaUtils` tries to 
overcome the problem that `BashJavaUtils` cannot access `flink-container` 
module from `flink-runtime`. If the previously described simple solution is not 
enough for now, what about moving `BashJavaUtils` into a separate module? This 
may be even a better abstraction of it as it is a separate artefact to build by 
maven.

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

Reply via email to