From a0ddc5b3a5e9f8b8bbf029aa83f2c67b10e003a2 Mon Sep 17 00:00:00 2001 From: Junping Du Date: Tue, 12 Jul 2016 08:29:49 -0700 Subject: [PATCH] New addendum to YARN-5080. Cannot obtain logs using YARN CLI -am for either KILLED or RUNNING AM. (cherry picked from commit 7705812c7e3a9f3f774130e25443fda249c08c9c) (cherry picked from commit 54812841e2f26275c2d993c73af45a9bbae3e3bf) --- .../main/java/org/apache/hadoop/yarn/client/cli/LogsCLI.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/cli/LogsCLI.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/cli/LogsCLI.java index 94cb1662135..52441f3c7a5 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/cli/LogsCLI.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/cli/LogsCLI.java @@ -380,9 +380,8 @@ public class LogsCLI extends Configured implements Tool { Configuration conf, String appId) throws ClientHandlerException, UniformInterfaceException, JSONException { Client webServiceClient = Client.create(); - String webAppAddress = WebAppUtils.getHttpSchemePrefix(conf) + - WebAppUtils.getWebAppBindURL(conf, YarnConfiguration.RM_BIND_HOST, - WebAppUtils.getRMWebAppURLWithoutScheme(conf)); + String webAppAddress = WebAppUtils.getRMWebAppURLWithScheme(conf); + WebResource webResource = webServiceClient.resource(webAppAddress); ClientResponse response =