abhishekdas99 commented on a change in pull request #2019:
URL: https://github.com/apache/hadoop/pull/2019#discussion_r434320391



##########
File path: 
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/ViewFileSystem.java
##########
@@ -1211,13 +1211,29 @@ public FileStatus getFileStatus(Path f) throws 
IOException {
         INode<FileSystem> inode = iEntry.getValue();
         if (inode.isLink()) {
           INodeLink<FileSystem> link = (INodeLink<FileSystem>) inode;
-
-          result[i++] = new FileStatus(0, false, 0, 0,
-            creationTime, creationTime, PERMISSION_555,
-            ugi.getShortUserName(), ugi.getPrimaryGroupName(),
-            link.getTargetLink(),
-            new Path(inode.fullPath).makeQualified(
-                myUri, null));
+          // For MERGE or NFLY links, the first target link is considered
+          // for fetching the FileStatus with an assumption that the permission
+          // and the owner will be the same for all the target directories.
+          Path linkedPath = new Path(link.targetDirLinkList[0].toString());

Review comment:
       In the new change , I have getting the filesystem by 
`link.getTargetFileSystem()` and calling `getFileStatus` on slash path.




----------------------------------------------------------------
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:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org

Reply via email to