azagrebin commented on a change in pull request #12110:
URL: https://github.com/apache/flink/pull/12110#discussion_r424962779
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/util/bash/BashJavaUtils.java
##########
@@ -40,18 +43,28 @@
@VisibleForTesting
public static final String EXECUTION_PREFIX =
"BASH_JAVA_UTILS_EXEC_RESULT:";
- public static void main(String[] args) throws Exception {
+ private BashJavaUtils() {
+ }
+
+ public static void main(String[] args) throws FlinkException {
checkArgument(args.length > 0, "Command not specified.");
+ Command command = Command.valueOf(args[0]);
String[] commandArgs = Arrays.copyOfRange(args, 1, args.length);
+ Configuration configuration =
FlinkConfigLoader.loadConfiguration(commandArgs);
Review comment:
I did it to simplify unit testing of `getJm/TmResourceParams`, otherwise
we would have to set config options in `flink-conf.yaml` and we do not need to
test the configuration loading for this change or similar changes. I can move
`FlinkConfigLoader.loadConfiguration` to `runCommand` and call
`getJmResourceParams` in unit tests. Then commands can use `commandArgs` later
if needed.
----------------------------------------------------------------
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]