tomicooler commented on code in PR #6120:
URL: https://github.com/apache/hadoop/pull/6120#discussion_r1339435762


##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/logaggregation/filecontroller/LogAggregationFileController.java:
##########
@@ -429,26 +460,36 @@ public void verifyAndCreateRemoteLogDir() {
             + remoteRootLogDir + "]", e);
       }
     } else {
-      //Check if FS has capability to set/modify permissions
-      Path permissionCheckFile = new Path(qualified, 
String.format("%s.permission_check",
-          RandomStringUtils.randomAlphanumeric(8)));
+      final FsLogPathKey key = new FsLogPathKey(remoteFS.getClass(), 
qualified);
+      FileSystem finalRemoteFS = remoteFS;
+      FS_CHMOD_CACHE.computeIfAbsent(key, k -> {
+        fsSupportsChmod = checkFsSupportsChmod(finalRemoteFS, 
remoteRootLogDir, qualified);
+        return fsSupportsChmod;
+      });
+    }

Review Comment:
   TODO: missed the get part where the member fsSupportsChmod is updated.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to