ashvina commented on a change in pull request #1478: HDFS-14856 Fetch file ACLs 
while mounting external store
URL: https://github.com/apache/hadoop/pull/1478#discussion_r326762306
 
 

 ##########
 File path: 
hadoop-tools/hadoop-fs2img/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSTreeWalk.java
 ##########
 @@ -71,14 +95,24 @@ private FSTreeIterator() {
     }
 
     FSTreeIterator(TreePath p) {
+      AclStatus acls = null;
+      Path remotePath = p.getFileStatus().getPath();
+      try {
+        acls = getAclStatus(fs, remotePath);
+      } catch (IOException e) {
+        LOG.warn(
+            "Got exception when trying to get remote acls for path {} : {}",
+            remotePath, e.getMessage());
+      }
       getPendingQueue().addFirst(
-          new TreePath(p.getFileStatus(), p.getParentId(), this, fs));
+          new TreePath(p.getFileStatus(), p.getParentId(), this, fs, acls));
 
 Review comment:
   ACL can be `null`.
   `IOException` comes from the `FileSystems` API, `AclStatus getAclStatus(Path 
path) throws IOException` 

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

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

Reply via email to