From a2067aafa941344c2c1713ba835a107f7231c2cc Mon Sep 17 00:00:00 2001 From: Wilfred Spiegelenburg Date: Wed, 8 Apr 2020 11:30:03 +1000 Subject: [PATCH] YARN-10063. Add container-executor arguments --http/--https to usage. Contributed by Siddharth Ahuja Conflicts: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/native/container-executor/impl/main.c (cherry picked from commit 2214005c0f11955b2c50c4d2d4bd14947dd797ba) --- .../native/container-executor/impl/main.c | 30 +++++++++++-------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/native/container-executor/impl/main.c b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/native/container-executor/impl/main.c index a3057e63998..c6187d9a222 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/native/container-executor/impl/main.c +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/native/container-executor/impl/main.c @@ -72,7 +72,7 @@ static void display_usage(FILE *stream) { " initialize container: %2d appid tokens nm-local-dirs " "nm-log-dirs cmd app...\n" " launch container: %2d appid containerid workdir " - "container-script tokens pidfile nm-local-dirs nm-log-dirs resources ", + "container-script tokens http-option pidfile nm-local-dirs nm-log-dirs resources ", INITIALIZE_CONTAINER, LAUNCH_CONTAINER); if(is_tc_support_enabled()) { @@ -81,17 +81,16 @@ static void display_usage(FILE *stream) { fprintf(stream, "\n"); } - if(is_docker_support_enabled()) { - fprintf(stream, - " launch docker container: %2d appid containerid workdir " - "container-script tokens pidfile nm-local-dirs nm-log-dirs " - "docker-command-file resources ", LAUNCH_DOCKER_CONTAINER); - } else { - fprintf(stream, - "[DISABLED] launch docker container: %2d appid containerid workdir " - "container-script tokens pidfile nm-local-dirs nm-log-dirs " - "docker-command-file resources ", LAUNCH_DOCKER_CONTAINER); - } + fputs( + " where http-option is one of:\n" + " --http\n" + " --https keystorepath truststorepath\n", stream); + + de = is_docker_support_enabled() ? enabled : disabled; + fprintf(stream, + "%11s launch docker container:%2d appid containerid workdir " + "container-script tokens http-option pidfile nm-local-dirs nm-log-dirs " + "docker-command-file resources ", de, LAUNCH_DOCKER_CONTAINER); if(is_tc_support_enabled()) { fprintf(stream, "optional-tc-command-file\n"); @@ -99,7 +98,12 @@ static void display_usage(FILE *stream) { fprintf(stream, "\n"); } - fprintf(stream, + fputs( + " where http-option is one of:\n" + " --http\n" + " --https keystorepath truststorepath\n", stream); + + fprintf(stream, " signal container: %2d container-pid signal\n" " delete as user: %2d relative-path\n" " list as user: %2d relative-path\n",