YARN-2050. Fix LogCLIHelpers to create the correct FileContext. Contributed by Ming Ma

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1596310 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jason Darrell Lowe 2014-05-20 16:19:55 +00:00
parent 1f8bb1001a
commit 64ec743e6c
2 changed files with 7 additions and 1 deletions

View File

@ -114,6 +114,9 @@ Release 2.5.0 - UNRELEASED
YARN-2042. String shouldn't be compared using == in
QueuePlacementRule#NestedUserQueue#getQueueForApp (Chen He via Sandy Ryza)
YARN-2050. Fix LogCLIHelpers to create the correct FileContext (Ming Ma
via jlowe)
Release 2.4.1 - UNRELEASED
INCOMPATIBLE CHANGES

View File

@ -109,7 +109,10 @@ public int dumpAllContainersLogs(ApplicationId appId, String appOwner,
remoteRootLogDir, appId, user, logDirSuffix);
RemoteIterator<FileStatus> nodeFiles;
try {
nodeFiles = FileContext.getFileContext().listStatus(remoteAppLogDir);
Path qualifiedLogDir =
FileContext.getFileContext(getConf()).makeQualified(remoteAppLogDir);
nodeFiles = FileContext.getFileContext(qualifiedLogDir.toUri(),
getConf()).listStatus(remoteAppLogDir);
} catch (FileNotFoundException fnf) {
System.out.println("Logs not available at " + remoteAppLogDir.toString());
System.out