YARN-5080. Addendum fix to the original patch to fix YARN logs CLI. Contributed by Xuan Gong

(cherry picked from commit 5a43583c0b)
This commit is contained in:
Vinod Kumar Vavilapalli 2016-06-08 09:49:55 -07:00
parent fb31aaef63
commit 593d2c66c4
1 changed files with 3 additions and 1 deletions

View File

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