From 4eeec4e35bbbf1e1b721eca514312a4c3ac99ef6 Mon Sep 17 00:00:00 2001 From: Xuan Date: Sat, 14 May 2016 12:19:23 -0700 Subject: [PATCH] YARN-5080. Cannot obtain logs using YARN CLI -am for either KILLED or RUNNING AM. Contributed by Xuan Gong (cherry picked from commit 7be53b65f95dae89c760cde354b42f15f5ee3b5f) (cherry picked from commit 3fe4107909393dea91adac9fda16c45814e01648) --- .../main/java/org/apache/hadoop/yarn/client/cli/LogsCLI.java | 4 +--- 1 file changed, 1 insertion(+), 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 edee8eef745..89e6bfff748 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 @@ -379,9 +379,7 @@ public class LogsCLI extends Configured implements Tool { Configuration conf, String appId) throws ClientHandlerException, UniformInterfaceException, JSONException { Client webServiceClient = Client.create(); - String webAppAddress = - WebAppUtils.getWebAppBindURL(conf, YarnConfiguration.RM_BIND_HOST, - WebAppUtils.getRMWebAppURLWithScheme(conf)); + String webAppAddress = WebAppUtils.getRMWebAppURLWithScheme(conf); WebResource webResource = webServiceClient.resource(webAppAddress); ClientResponse response =