-
Notifications
You must be signed in to change notification settings - Fork 9.2k
HADOOP-18110. ViewFileSystem: Add Support for Localized Trash Root #3956
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
Conversation
|
💔 -1 overall
This message was automatically generated. |
|
💔 -1 overall
This message was automatically generated. |
|
🎊 +1 overall
This message was automatically generated. |
|
🎊 +1 overall
This message was automatically generated. |
|
🎊 +1 overall
This message was automatically generated. |
|
🎊 +1 overall
This message was automatically generated. |
|
🎊 +1 overall
This message was automatically generated. |
|
🎊 +1 overall
This message was automatically generated. |
|
💔 -1 overall
This message was automatically generated. |
|
💔 -1 overall
This message was automatically generated. |
omalley
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking good. I'd like one more test and to fix the javadoc breakage.
...p-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/ViewFileSystem.java
Outdated
Show resolved
Hide resolved
| Assert.assertTrue("", fsView.getTrashRoots(true).size() > 0); | ||
| } | ||
|
|
||
| /** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a test where the child file system returns a root inside of the mount point, such as what will happen when there is an encryption zone root. To do so, you'll need to define a mock/stub fs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @omalley,
I believe Case 5 is what you are looking for. 😃
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, it isn't. I was more concerned with what would happen with an encryption zone or snapshot root. You'd need to make a mock child file system that implements a custom getTrashRoot(path).
|
🎊 +1 overall
This message was automatically generated. |
|
🎊 +1 overall
This message was automatically generated. |
Fixes apache#3956 (cherry picked from commit ca8ba24)
Fixes #3956 Fixes #3994 (cherry picked from commit ca8ba24) Signed-off-by: Owen O'Malley <[email protected]>
Description of PR
We modified getTrashRoot()/getTrashRoots() in ViewFileSystem to return a localized trash root that is within a mount point when CONFIG_VIEWFS_MOUNT_POINT_LOCAL_TRASH is set.
How was this patch tested?
mvn test -Dtest=TestView*
Manually ran three newly added unit tests using intellij.