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_r408665649
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/util/BashJavaUtils.java
##########
@@ -63,11 +69,39 @@ private static void getTmResourceParams(String[] args)
throws Exception {
}
private static Configuration
getConfigurationForStandaloneTaskManagers(String[] args) throws Exception {
- Configuration configuration =
TaskManagerRunner.loadConfiguration(args);
+ Configuration configuration = loadConfiguration(args);
return
TaskExecutorProcessUtils.getConfigurationMapLegacyTaskManagerHeapSizeToConfigOption(
configuration, TaskManagerOptions.TOTAL_FLINK_MEMORY);
}
+ @VisibleForTesting
+ static Configuration loadConfiguration(String[] args) throws
FlinkException {
Review comment:
Some minor suggestion for future maintenance:
We could move `BashJavaUtils` to `org.apache.flink.runtime.util.bash`
package and add there `FlinkConfigLoader` for `loadConfiguration`. The
`BashJavaUtilsTest` would be `FlinkConfigLoaderTest`. Also options could be
there:
`private final static Options CMD_OPTIONS = (new
ClusterConfigurationParserFactory()).getOptions();`.
----------------------------------------------------------------
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