virajith 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_r326873702
##########
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));
}
FSTreeIterator(Path p) throws IOException {
try {
FileStatus s = fs.getFileStatus(root);
- getPendingQueue().addFirst(new TreePath(s, -1L, this, fs));
+ AclStatus acls = getAclStatus(fs, s.getPath());
Review comment:
@ashvina - is it possible to handle the exception the same way in both the
constructors?
----------------------------------------------------------------
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]