YARN-5777. TestLogsCLI#testFetchApplictionLogsAsAnotherUser fails. Contributed by Akira Ajisaka.
This commit is contained in:
parent
9a8a386458
commit
c88c1dc50c
@ -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;
|
||||
}
|
||||
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user