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) {
|
} catch (AccessControlException | AccessDeniedException ace) {
|
||||||
logDirNoAccessPermission(remoteAppLogDir.toString(), appOwner,
|
logDirNoAccessPermission(remoteAppLogDir.toString(), appOwner,
|
||||||
ace.getMessage());
|
ace.getMessage());
|
||||||
|
} catch (IOException ioe) {
|
||||||
|
logDirIOError(remoteAppLogDir.toString(), ioe.getMessage());
|
||||||
}
|
}
|
||||||
return nodeFiles;
|
return nodeFiles;
|
||||||
}
|
}
|
||||||
@ -644,6 +646,11 @@ private static void logDirNoAccessPermission(String remoteAppLogDir,
|
|||||||
+ ". Error message found: " + errorMessage);
|
+ ". Error message found: " + errorMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static void logDirIOError(String remoteAppLogDir, String errMsg) {
|
||||||
|
System.err.println("Cannot access to " + remoteAppLogDir +
|
||||||
|
". Error message found: " + errMsg);
|
||||||
|
}
|
||||||
|
|
||||||
@Private
|
@Private
|
||||||
public PrintStream createPrintStream(String localDir, String nodeId,
|
public PrintStream createPrintStream(String localDir, String nodeId,
|
||||||
String containerId) throws IOException {
|
String containerId) throws IOException {
|
||||||
|
Loading…
Reference in New Issue
Block a user