YARN-5080. Cannot obtain logs using YARN CLI -am for either KILLED or

RUNNING AM. Contributed by Xuan Gong

(cherry picked from commit 7be53b65f9)
(cherry picked from commit 3fe4107909)
This commit is contained in:
Xuan 2016-05-14 12:19:23 -07:00
parent 6b1af6ce68
commit 4eeec4e35b
1 changed files with 1 additions and 3 deletions

View File

@ -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 =