Skip to content

HADOOP-17029. Return correct permission and owner for listing on internal directories in ViewFs #2019

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jun 5, 2020

Conversation

abhishekdas99
Copy link
Contributor

@abhishekdas99 abhishekdas99 commented May 13, 2020

HADOOP-17029. ViewFS does not return correct user/group and ACL

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 0m 44s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 1 new or modified test files.
_ trunk Compile Tests _
+1 💚 mvninstall 19m 23s trunk passed
+1 💚 compile 17m 18s trunk passed
+1 💚 checkstyle 0m 52s trunk passed
+1 💚 mvnsite 1m 28s trunk passed
+1 💚 shadedclient 16m 31s branch has no errors when building and testing our client artifacts.
+1 💚 javadoc 1m 2s trunk passed
+0 🆗 spotbugs 2m 8s Used deprecated FindBugs config; considering switching to SpotBugs.
+1 💚 findbugs 2m 6s trunk passed
_ Patch Compile Tests _
+1 💚 mvninstall 0m 50s the patch passed
+1 💚 compile 16m 12s the patch passed
-1 ❌ javac 16m 12s root generated 2 new + 1857 unchanged - 2 fixed = 1859 total (was 1859)
-0 ⚠️ checkstyle 0m 54s hadoop-common-project/hadoop-common: The patch generated 1 new + 47 unchanged - 0 fixed = 48 total (was 47)
+1 💚 mvnsite 1m 27s the patch passed
+1 💚 whitespace 0m 0s The patch has no whitespace issues.
+1 💚 shadedclient 13m 56s patch has no errors when building and testing our client artifacts.
+1 💚 javadoc 1m 5s the patch passed
+1 💚 findbugs 2m 14s the patch passed
_ Other Tests _
-1 ❌ unit 9m 22s hadoop-common in the patch passed.
+1 💚 asflicense 0m 57s The patch does not generate ASF License warnings.
107m 37s
Reason Tests
Failed junit tests hadoop.fs.viewfs.TestViewFileSystemWithAuthorityLocalFileSystem
hadoop.fs.viewfs.TestViewFileSystemLocalFileSystem
Subsystem Report/Notes
Docker ClientAPI=1.40 ServerAPI=1.40 base: https://builds.apache.org/job/hadoop-multibranch/job/PR-2019/1/artifact/out/Dockerfile
GITHUB PR #2019
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle
uname Linux a1156be1339b 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality personality/hadoop.sh
git revision trunk / 743c2e9
Default Java Private Build-1.8.0_252-8u252-b09-1~18.04-b09
javac https://builds.apache.org/job/hadoop-multibranch/job/PR-2019/1/artifact/out/diff-compile-javac-root.txt
checkstyle https://builds.apache.org/job/hadoop-multibranch/job/PR-2019/1/artifact/out/diff-checkstyle-hadoop-common-project_hadoop-common.txt
unit https://builds.apache.org/job/hadoop-multibranch/job/PR-2019/1/artifact/out/patch-unit-hadoop-common-project_hadoop-common.txt
Test Results https://builds.apache.org/job/hadoop-multibranch/job/PR-2019/1/testReport/
Max. process+thread count 3338 (vs. ulimit of 5500)
modules C: hadoop-common-project/hadoop-common U: hadoop-common-project/hadoop-common
Console output https://builds.apache.org/job/hadoop-multibranch/job/PR-2019/1/console
versions git=2.17.1 maven=3.6.0 findbugs=3.1.0-RC1
Powered by Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 0m 33s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 1 new or modified test files.
_ trunk Compile Tests _
+1 💚 mvninstall 19m 0s trunk passed
+1 💚 compile 17m 2s trunk passed
+1 💚 checkstyle 0m 55s trunk passed
+1 💚 mvnsite 1m 27s trunk passed
+1 💚 shadedclient 16m 27s branch has no errors when building and testing our client artifacts.
+1 💚 javadoc 1m 6s trunk passed
+0 🆗 spotbugs 2m 9s Used deprecated FindBugs config; considering switching to SpotBugs.
+1 💚 findbugs 2m 7s trunk passed
_ Patch Compile Tests _
+1 💚 mvninstall 0m 48s the patch passed
+1 💚 compile 16m 14s the patch passed
-1 ❌ javac 16m 14s root generated 2 new + 1857 unchanged - 2 fixed = 1859 total (was 1859)
+1 💚 checkstyle 0m 53s the patch passed
+1 💚 mvnsite 1m 25s the patch passed
+1 💚 whitespace 0m 0s The patch has no whitespace issues.
+1 💚 shadedclient 13m 59s patch has no errors when building and testing our client artifacts.
+1 💚 javadoc 1m 4s the patch passed
+1 💚 findbugs 2m 17s the patch passed
_ Other Tests _
-1 ❌ unit 9m 9s hadoop-common in the patch passed.
+1 💚 asflicense 0m 54s The patch does not generate ASF License warnings.
106m 29s
Reason Tests
Failed junit tests hadoop.fs.viewfs.TestViewFileSystemLocalFileSystem
hadoop.fs.viewfs.TestViewFileSystemWithAuthorityLocalFileSystem
hadoop.fs.viewfs.TestViewFsWithAuthorityLocalFs
hadoop.fs.viewfs.TestViewFsLocalFs
Subsystem Report/Notes
Docker ClientAPI=1.40 ServerAPI=1.40 base: https://builds.apache.org/job/hadoop-multibranch/job/PR-2019/2/artifact/out/Dockerfile
GITHUB PR #2019
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle
uname Linux c38cac0614b8 4.15.0-60-generic #67-Ubuntu SMP Thu Aug 22 16:55:30 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality personality/hadoop.sh
git revision trunk / 0918433
Default Java Private Build-1.8.0_252-8u252-b09-1~18.04-b09
javac https://builds.apache.org/job/hadoop-multibranch/job/PR-2019/2/artifact/out/diff-compile-javac-root.txt
unit https://builds.apache.org/job/hadoop-multibranch/job/PR-2019/2/artifact/out/patch-unit-hadoop-common-project_hadoop-common.txt
Test Results https://builds.apache.org/job/hadoop-multibranch/job/PR-2019/2/testReport/
Max. process+thread count 1365 (vs. ulimit of 5500)
modules C: hadoop-common-project/hadoop-common U: hadoop-common-project/hadoop-common
Console output https://builds.apache.org/job/hadoop-multibranch/job/PR-2019/2/console
versions git=2.17.1 maven=3.6.0 findbugs=3.1.0-RC1
Powered by Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 22m 31s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 1 new or modified test files.
_ trunk Compile Tests _
+1 💚 mvninstall 19m 30s trunk passed
+1 💚 compile 17m 2s trunk passed
+1 💚 checkstyle 0m 53s trunk passed
+1 💚 mvnsite 1m 26s trunk passed
+1 💚 shadedclient 16m 30s branch has no errors when building and testing our client artifacts.
+1 💚 javadoc 1m 3s trunk passed
+0 🆗 spotbugs 2m 8s Used deprecated FindBugs config; considering switching to SpotBugs.
+1 💚 findbugs 2m 6s trunk passed
_ Patch Compile Tests _
+1 💚 mvninstall 0m 49s the patch passed
+1 💚 compile 16m 17s the patch passed
-1 ❌ javac 16m 17s root generated 2 new + 1857 unchanged - 2 fixed = 1859 total (was 1859)
+1 💚 checkstyle 0m 54s the patch passed
+1 💚 mvnsite 1m 28s the patch passed
+1 💚 whitespace 0m 0s The patch has no whitespace issues.
+1 💚 shadedclient 13m 49s patch has no errors when building and testing our client artifacts.
+1 💚 javadoc 1m 4s the patch passed
+1 💚 findbugs 2m 15s the patch passed
_ Other Tests _
+1 💚 unit 9m 35s hadoop-common in the patch passed.
+1 💚 asflicense 0m 51s The patch does not generate ASF License warnings.
129m 15s
Subsystem Report/Notes
Docker ClientAPI=1.40 ServerAPI=1.40 base: https://builds.apache.org/job/hadoop-multibranch/job/PR-2019/3/artifact/out/Dockerfile
GITHUB PR #2019
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle
uname Linux 563dbd86cd56 4.15.0-60-generic #67-Ubuntu SMP Thu Aug 22 16:55:30 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality personality/hadoop.sh
git revision trunk / 0918433
Default Java Private Build-1.8.0_252-8u252-b09-1~18.04-b09
javac https://builds.apache.org/job/hadoop-multibranch/job/PR-2019/3/artifact/out/diff-compile-javac-root.txt
Test Results https://builds.apache.org/job/hadoop-multibranch/job/PR-2019/3/testReport/
Max. process+thread count 2016 (vs. ulimit of 5500)
modules C: hadoop-common-project/hadoop-common U: hadoop-common-project/hadoop-common
Console output https://builds.apache.org/job/hadoop-multibranch/job/PR-2019/3/console
versions git=2.17.1 maven=3.6.0 findbugs=3.1.0-RC1
Powered by Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

Copy link
Contributor

@chliang71 chliang71 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good overall, added some comments

Comment on lines +1230 to +1219
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));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

two comments:

  1. seems to be some duplicate code, the "else" branch is pretty much the same, can we refactor here?
  2. Not sure if this is the best way when dealing with FileNotFoundException. If I understand this correctly, it is possible that some mounts does not have this path, so it can hit FileNotFoundException?

If this is the case, I wonder if it makes more sense to just skip this mount, by not adding a FileStatus for mount at all. So that clients do not get confused by an actually non-existing FileStatus, among other existing ones. But one issue here would be that result array is strictly the size of the # of mounts. Creating result as a list, append, and then return as a array may resolve this.

Copy link
Contributor

@umamaheswararao umamaheswararao May 26, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For # 2: The problem here I think we may not be able reset mount automatically, so until some one checks file exists or do op on target, we will not know whether the file exists or not. This will continue until user updates mount points accordingly.
This can be possible when some one deletes the target directory directly but not updated the mount tables accordingly. Please check one of my comment on behavior of ls in MAC. Also we have other issue: isDir is inconsistent.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry if I am missing anything. The change with catching the FileNotFoundException is good ? or I need to make a change.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry if I am missing anything. The change with catching the FileNotFoundException is good ? or I need to change something. @umamaheswararao

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO, FileNotFoundException is fine. Please see my comment below https://github.com/apache/hadoop/pull/2019/files#r430611396
@chliang71 , What do you say?

inodelink.getTargetLink(),
new Path(inode.fullPath).makeQualified(
myUri, null));
} catch (FileNotFoundException ex) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

similar comment regarding FileNotFoundException. I think in general, it's better to match behavior of non-federated client. If a path does not exist, just throw back FileNotFoundException.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

similar comment regarding FileNotFoundException. I think in general, it's better to match behavior of non-federated client. If a path does not exist, just throw back FileNotFoundException.

I just verified symlinks. When target deleted, ls on symlink does not throw FNFE. Instead it is converted to file link. I tested dir->dir link.
It seems this behavior is correct when compared with other fs. I tested on my MAC.
Should this be fixed in federated clusters is necessary ? Could you please validate this?
If we attempt to open that non existent link file, then we can throw out exception. But ls seems to simply pass.

Work % mkdir linkTarget 
Work % ln -s linkTarget linkSrc
Work % ls -l
lrwxr-xr-x   1 umagangumalla  xxxx     10 May 26 11:08 linkSrc -> linkTarget
Work % rm -rf linkTarget 
Work % ls -l            
lrwxr-xr-x   1 umagangumalla  xxxx     10 May 26 11:08 linkSrc -> linkTarget
Work % cd linkSrc
cd: no such file or directory: linkSrc

link.getTargetLink(),
new Path(inode.fullPath).makeQualified(
myUri, null));
} catch (FileNotFoundException ex) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same comment about FileNotFoundException here

}

@Test
public void testListStatusACL()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some javadoc, and comments in the code could be helpful

Copy link
Contributor

@umamaheswararao umamaheswararao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @abhishekdas99 for working on this.
Thanks @chliang71 for reviews. In addition to @chliang71 review, I just added few comments. Please take a look. Thanks

// 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());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instead of link.targetDirLinkList[0], link.getTargetFileSystem().getUri() should work?
This might work for nfly also I think. Because nfly has its own GetFileStatus impl, probably we should use that impl only instead of getting one targetDirLinkList[0]

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

inodelink.getTargetLink(),
new Path(inode.fullPath).makeQualified(
myUri, null));
} catch (FileNotFoundException ex) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

similar comment regarding FileNotFoundException. I think in general, it's better to match behavior of non-federated client. If a path does not exist, just throw back FileNotFoundException.

I just verified symlinks. When target deleted, ls on symlink does not throw FNFE. Instead it is converted to file link. I tested dir->dir link.
It seems this behavior is correct when compared with other fs. I tested on my MAC.
Should this be fixed in federated clusters is necessary ? Could you please validate this?
If we attempt to open that non existent link file, then we can throw out exception. But ls seems to simply pass.

Work % mkdir linkTarget 
Work % ln -s linkTarget linkSrc
Work % ls -l
lrwxr-xr-x   1 umagangumalla  xxxx     10 May 26 11:08 linkSrc -> linkTarget
Work % rm -rf linkTarget 
Work % ls -l            
lrwxr-xr-x   1 umagangumalla  xxxx     10 May 26 11:08 linkSrc -> linkTarget
Work % cd linkSrc
cd: no such file or directory: linkSrc

Comment on lines +1230 to +1219
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));
Copy link
Contributor

@umamaheswararao umamaheswararao May 26, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For # 2: The problem here I think we may not be able reset mount automatically, so until some one checks file exists or do op on target, we will not know whether the file exists or not. This will continue until user updates mount points accordingly.
This can be possible when some one deletes the target directory directly but not updated the mount tables accordingly. Please check one of my comment on behavior of ls in MAC. Also we have other issue: isDir is inconsistent.

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 0m 0s Docker mode activated.
-1 ❌ patch 0m 5s #2019 does not apply to trunk. Rebase required? Wrong Branch? See https://wiki.apache.org/hadoop/HowToContribute for help.
Subsystem Report/Notes
GITHUB PR #2019
Console output https://builds.apache.org/job/hadoop-multibranch/job/PR-2019/4/console
versions git=2.17.1
Powered by Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@abhishekdas99 abhishekdas99 force-pushed the HADOOP-17029 branch 2 times, most recently from cf990e0 to 49071eb Compare June 3, 2020 06:40
@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 0m 32s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 1 new or modified test files.
_ trunk Compile Tests _
+1 💚 mvninstall 18m 40s trunk passed
+1 💚 compile 16m 57s trunk passed
+1 💚 checkstyle 0m 54s trunk passed
+1 💚 mvnsite 1m 29s trunk passed
+1 💚 shadedclient 16m 35s branch has no errors when building and testing our client artifacts.
+1 💚 javadoc 1m 2s trunk passed
+0 🆗 spotbugs 2m 11s Used deprecated FindBugs config; considering switching to SpotBugs.
+1 💚 findbugs 2m 9s trunk passed
_ Patch Compile Tests _
+1 💚 mvninstall 0m 49s the patch passed
+1 💚 compile 16m 17s the patch passed
-1 ❌ javac 16m 17s root generated 2 new + 1857 unchanged - 2 fixed = 1859 total (was 1859)
-0 ⚠️ checkstyle 0m 54s hadoop-common-project/hadoop-common: The patch generated 1 new + 93 unchanged - 0 fixed = 94 total (was 93)
+1 💚 mvnsite 1m 27s the patch passed
+1 💚 whitespace 0m 0s The patch has no whitespace issues.
+1 💚 shadedclient 14m 16s patch has no errors when building and testing our client artifacts.
+1 💚 javadoc 1m 2s the patch passed
+1 💚 findbugs 2m 15s the patch passed
_ Other Tests _
+1 💚 unit 9m 24s hadoop-common in the patch passed.
+1 💚 asflicense 0m 52s The patch does not generate ASF License warnings.
106m 41s
Subsystem Report/Notes
Docker ClientAPI=1.40 ServerAPI=1.40 base: https://builds.apache.org/job/hadoop-multibranch/job/PR-2019/5/artifact/out/Dockerfile
GITHUB PR #2019
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle
uname Linux c93feccbbf4e 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality personality/hadoop.sh
git revision trunk / 6288e15
Default Java Private Build-1.8.0_252-8u252-b09-1~18.04-b09
javac https://builds.apache.org/job/hadoop-multibranch/job/PR-2019/5/artifact/out/diff-compile-javac-root.txt
checkstyle https://builds.apache.org/job/hadoop-multibranch/job/PR-2019/5/artifact/out/diff-checkstyle-hadoop-common-project_hadoop-common.txt
Test Results https://builds.apache.org/job/hadoop-multibranch/job/PR-2019/5/testReport/
Max. process+thread count 1421 (vs. ulimit of 5500)
modules C: hadoop-common-project/hadoop-common U: hadoop-common-project/hadoop-common
Console output https://builds.apache.org/job/hadoop-multibranch/job/PR-2019/5/console
versions git=2.17.1 maven=3.6.0 findbugs=3.1.0-RC1
Powered by Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 0m 27s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 1 new or modified test files.
_ trunk Compile Tests _
+1 💚 mvninstall 21m 23s trunk passed
+1 💚 compile 22m 12s trunk passed
+1 💚 checkstyle 0m 57s trunk passed
+1 💚 mvnsite 1m 49s trunk passed
+1 💚 shadedclient 21m 7s branch has no errors when building and testing our client artifacts.
+1 💚 javadoc 1m 1s trunk passed
+0 🆗 spotbugs 2m 37s Used deprecated FindBugs config; considering switching to SpotBugs.
+1 💚 findbugs 2m 33s trunk passed
_ Patch Compile Tests _
+1 💚 mvninstall 1m 0s the patch passed
+1 💚 compile 21m 50s the patch passed
-1 ❌ javac 21m 50s root generated 2 new + 1857 unchanged - 2 fixed = 1859 total (was 1859)
+1 💚 checkstyle 0m 53s the patch passed
+1 💚 mvnsite 1m 38s the patch passed
+1 💚 whitespace 0m 0s The patch has no whitespace issues.
+1 💚 shadedclient 17m 22s patch has no errors when building and testing our client artifacts.
+1 💚 javadoc 1m 0s the patch passed
+1 💚 findbugs 2m 32s the patch passed
_ Other Tests _
+1 💚 unit 10m 40s hadoop-common in the patch passed.
+1 💚 asflicense 0m 52s The patch does not generate ASF License warnings.
129m 44s
Subsystem Report/Notes
Docker ClientAPI=1.40 ServerAPI=1.40 base: https://builds.apache.org/job/hadoop-multibranch/job/PR-2019/6/artifact/out/Dockerfile
GITHUB PR #2019
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle
uname Linux e99a4c65b0a2 4.15.0-101-generic #102-Ubuntu SMP Mon May 11 10:07:26 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality personality/hadoop.sh
git revision trunk / e8cb2ae
Default Java Private Build-1.8.0_252-8u252-b09-1~18.04-b09
javac https://builds.apache.org/job/hadoop-multibranch/job/PR-2019/6/artifact/out/diff-compile-javac-root.txt
Test Results https://builds.apache.org/job/hadoop-multibranch/job/PR-2019/6/testReport/
Max. process+thread count 2466 (vs. ulimit of 5500)
modules C: hadoop-common-project/hadoop-common U: hadoop-common-project/hadoop-common
Console output https://builds.apache.org/job/hadoop-multibranch/job/PR-2019/6/console
versions git=2.17.1 maven=3.6.0 findbugs=3.1.0-RC1
Powered by Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

Comment on lines +1230 to +1219
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));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO, FileNotFoundException is fine. Please see my comment below https://github.com/apache/hadoop/pull/2019/files#r430611396
@chliang71 , What do you say?

myUri, null));
try {
FileStatus status = link.getTargetFileSystem()
.getFileStatus(new Path("/"));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we getting status on "/"? In practical scenario it should work. However what if the target uri is a file?
Should we simply use link.getTargetFileSystem().getUri() ?
Could you please check scenario? If this works, I have no other changes.
Thanks for update.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed to link.getTargetFileSystem().getUri(). Used ChRootedFileSystem to obtain the filestatus. ((ChRootedFileSystem)link.getTargetFileSystem()).getMyFs().getFileStatus().

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 0m 34s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 1 new or modified test files.
_ trunk Compile Tests _
+1 💚 mvninstall 21m 19s trunk passed
+1 💚 compile 17m 24s trunk passed
+1 💚 checkstyle 0m 52s trunk passed
+1 💚 mvnsite 1m 25s trunk passed
+1 💚 shadedclient 16m 45s branch has no errors when building and testing our client artifacts.
+1 💚 javadoc 1m 4s trunk passed
+0 🆗 spotbugs 2m 8s Used deprecated FindBugs config; considering switching to SpotBugs.
+1 💚 findbugs 2m 6s trunk passed
_ Patch Compile Tests _
+1 💚 mvninstall 0m 50s the patch passed
+1 💚 compile 16m 12s the patch passed
-1 ❌ javac 16m 12s root generated 2 new + 1857 unchanged - 2 fixed = 1859 total (was 1859)
+1 💚 checkstyle 0m 53s the patch passed
+1 💚 mvnsite 1m 27s the patch passed
+1 💚 whitespace 0m 0s The patch has no whitespace issues.
+1 💚 shadedclient 13m 55s patch has no errors when building and testing our client artifacts.
+1 💚 javadoc 1m 3s the patch passed
+1 💚 findbugs 2m 18s the patch passed
_ Other Tests _
+1 💚 unit 9m 38s hadoop-common in the patch passed.
+1 💚 asflicense 0m 53s The patch does not generate ASF License warnings.
109m 50s
Subsystem Report/Notes
Docker ClientAPI=1.40 ServerAPI=1.40 base: https://builds.apache.org/job/hadoop-multibranch/job/PR-2019/7/artifact/out/Dockerfile
GITHUB PR #2019
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle
uname Linux 87749bd9ff8c 4.15.0-60-generic #67-Ubuntu SMP Thu Aug 22 16:55:30 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality personality/hadoop.sh
git revision trunk / 545a0a1
Default Java Private Build-1.8.0_252-8u252-b09-1~18.04-b09
javac https://builds.apache.org/job/hadoop-multibranch/job/PR-2019/7/artifact/out/diff-compile-javac-root.txt
Test Results https://builds.apache.org/job/hadoop-multibranch/job/PR-2019/7/testReport/
Max. process+thread count 3206 (vs. ulimit of 5500)
modules C: hadoop-common-project/hadoop-common U: hadoop-common-project/hadoop-common
Console output https://builds.apache.org/job/hadoop-multibranch/job/PR-2019/7/console
versions git=2.17.1 maven=3.6.0 findbugs=3.1.0-RC1
Powered by Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@umamaheswararao
Copy link
Contributor

umamaheswararao commented Jun 5, 2020

+1 Looks good to me. Thanks for working on it. If no other objections, I will commit it in some time.

@abhishekdas99
Copy link
Contributor Author

+1 Looks good to me. Thanks for working on it. If no other objections, I will commit it in some time.

Thanks @umamaheswararao. Sorry for the delay

@umamaheswararao umamaheswararao merged commit e7dd027 into apache:trunk Jun 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants