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

RUNNING AM. Contributed by Xuan Gong
This commit is contained in:
Xuan 2016-05-14 12:19:23 -07:00
parent 3fa1380c22
commit 7be53b65f9
1 changed files with 1 additions and 3 deletions

View File

@ -262,9 +262,7 @@ public class LogsCLI extends Configured implements Tool {
Configuration conf, String appId) throws ClientHandlerException, Configuration conf, String appId) throws ClientHandlerException,
UniformInterfaceException, JSONException { UniformInterfaceException, JSONException {
Client webServiceClient = Client.create(); Client webServiceClient = Client.create();
String webAppAddress = String webAppAddress = WebAppUtils.getRMWebAppURLWithScheme(conf);
WebAppUtils.getWebAppBindURL(conf, YarnConfiguration.RM_BIND_HOST,
WebAppUtils.getRMWebAppURLWithScheme(conf));
WebResource webResource = webServiceClient.resource(webAppAddress); WebResource webResource = webServiceClient.resource(webAppAddress);
ClientResponse response = ClientResponse response =