Skip to content

Commit

Permalink
YARN-5777. TestLogsCLI#testFetchApplictionLogsAsAnotherUser fails. Co…
Browse files Browse the repository at this point in the history
…ntributed by Akira Ajisaka.
  • Loading branch information
xiao-chen committed Oct 25, 2016
1 parent 9a8a386 commit c88c1dc
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -595,6 +595,8 @@ private RemoteIterator<FileStatus> getRemoteNodeFileDir(ApplicationId appId,
} catch (AccessControlException | AccessDeniedException ace) {
logDirNoAccessPermission(remoteAppLogDir.toString(), appOwner,
ace.getMessage());
} catch (IOException ioe) {
logDirIOError(remoteAppLogDir.toString(), ioe.getMessage());
}
return nodeFiles;
}
Expand Down Expand Up @@ -644,6 +646,11 @@ private static void logDirNoAccessPermission(String remoteAppLogDir,
+ ". Error message found: " + errorMessage);
}

private static void logDirIOError(String remoteAppLogDir, String errMsg) {
System.err.println("Cannot access to " + remoteAppLogDir +
". Error message found: " + errMsg);
}

@Private
public PrintStream createPrintStream(String localDir, String nodeId,
String containerId) throws IOException {
Expand Down

0 comments on commit c88c1dc

Please sign in to comment.