Przeglądaj źródła

YARN-5777. TestLogsCLI#testFetchApplictionLogsAsAnotherUser fails. Contributed by Akira Ajisaka.

Xiao Chen 8 lat temu
rodzic
commit
c88c1dc50c

+ 7 - 0
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/logaggregation/LogCLIHelpers.java

@@ -595,6 +595,8 @@ public class LogCLIHelpers implements Configurable {
     } catch (AccessControlException | AccessDeniedException ace) {
       logDirNoAccessPermission(remoteAppLogDir.toString(), appOwner,
         ace.getMessage());
+    } catch (IOException ioe) {
+      logDirIOError(remoteAppLogDir.toString(), ioe.getMessage());
     }
     return nodeFiles;
   }
@@ -644,6 +646,11 @@ public class LogCLIHelpers implements Configurable {
         + ". 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 {