Skip to content

Commit

Permalink
[FLINK-18048] Fix --host option for standalone application cluster
Browse files Browse the repository at this point in the history
This closes apache#12426.
  • Loading branch information
wangyang0918 authored and kl0u committed Jun 5, 2020
1 parent 61e6f70 commit 5834373
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ public Options getOptions() {
options.addOption(JOB_CLASS_NAME_OPTION);
options.addOption(JOB_ID_OPTION);
options.addOption(DYNAMIC_PROPERTY_OPTION);
options.addOption(HOST_OPTION);
options.addOption(CliFrontendParser.SAVEPOINT_PATH_OPTION);
options.addOption(CliFrontendParser.SAVEPOINT_ALLOW_NON_RESTORED_OPTION);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,4 +233,12 @@ public void testShortOptions() throws FlinkParseException {
assertThat(savepointRestoreSettings.allowNonRestoredState(), is(true));
}

@Test
public void testHostOption() throws FlinkParseException {
final String hostName = "user-specified-hostname";
final String[] args = {"--configDir", confDirPath, "--job-classname", "foobar", "--host", hostName};
final StandaloneApplicationClusterConfiguration applicationClusterConfiguration = commandLineParser.parse(args);
assertThat(applicationClusterConfiguration.getHostname(), is(hostName));
}

}

0 comments on commit 5834373

Please sign in to comment.