Skip to content

Commit

Permalink
[hotfix][runtime] Code clean-ups in BashJavaUtils and its test cases.
Browse files Browse the repository at this point in the history
  • Loading branch information
xintongsong authored and azagrebin committed Apr 27, 2020
1 parent af1d21f commit 3baa833
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion flink-dist/src/test/bin/runBashJavaUtilsCmd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@ FLINK_DIST_JAR=`find $FLINK_TARGET_DIR -name 'flink-dist*.jar'`

. ${bin}/../../main/flink-bin/bin/config.sh > /dev/null

output=$(runBashJavaUtilsCmd GET_TM_RESOURCE_PARAMS ${FLINK_CONF_DIR} "$FLINK_TARGET_DIR/bash-java-utils.jar:$FLINK_DIST_JAR}" $DYNAMIC_OPTS | tail -n 2)
output=$(runBashJavaUtilsCmd ${COMMAND} ${FLINK_CONF_DIR} "$FLINK_TARGET_DIR/bash-java-utils.jar:$FLINK_DIST_JAR}" $DYNAMIC_OPTS | tail -n 2)
extractExecutionParams "$(echo "$output" | head -n 1)"
extractExecutionParams "$(echo "$output" | tail -n 1)"
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public static void main(String[] args) throws Exception {

switch (Command.valueOf(args[0])) {
case GET_TM_RESOURCE_PARAMS:
getTmResourceParams(args);
getTmResourceParams(Arrays.copyOfRange(args, 1, args.length));
break;
default:
// unexpected, Command#valueOf should fail if a unknown command is passed in
Expand All @@ -61,7 +61,7 @@ private static void getTmResourceParams(String[] args) throws Exception {
}

private static Configuration getConfigurationForStandaloneTaskManagers(String[] args) throws Exception {
Configuration configuration = TaskManagerRunner.loadConfiguration(Arrays.copyOfRange(args, 1, args.length));
Configuration configuration = TaskManagerRunner.loadConfiguration(args);
return TaskExecutorProcessUtils.getConfigurationMapLegacyTaskManagerHeapSizeToConfigOption(
configuration, TaskManagerOptions.TOTAL_FLINK_MEMORY);
}
Expand Down

0 comments on commit 3baa833

Please sign in to comment.