-
Notifications
You must be signed in to change notification settings - Fork 9.1k
HDFS-16749. RBF: Gets the wrong directory information from Trash #6317
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
base: trunk
Are you sure you want to change the base?
Conversation
…rvice's trash path is not exists
@LiuGuH Thank you for your contribution! Could you please provide more details about your proposed modification? |
@@ -276,7 +276,7 @@ public void testMultipleMountPoint() throws IOException, | |||
|
|||
// Client user see global trash view, wo should see all three mount point. | |||
FileStatus[] fileStatuses = fs.listStatus(new Path("/user/test-trash/.Trash/Current/")); | |||
assertEquals(3, fileStatuses.length); | |||
assertEquals(2, fileStatuses.length); |
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.
Why does the size change?
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.
I add description in Description of PR. Thanks
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.
I modified the description and let's wait for other partners' suggestions. My personal suggestion is that we'd better solve the issue with smaller changes. (#5039)
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.
With #5039 , it will lead to user will not see any other nameservices trash path expect where the user home is mounted nameservices. It will break https://issues.apache.org/jira/browse/HDFS-16024 purpose.
💔 -1 overall
This message was automatically generated. |
@zhangxiping1 I see that you created HDFS-16749, pr #5039, and @LiuGuH also submitted a PR. Can we compare and explain the difference between the two prs? |
💔 -1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
Thanks @LiuGuH for your works.
I am confused why it returns wrong subdirs now? Thanks. |
|
getListing can be separated into two parts subtractTrashCurrentPath("/user/test-user/.Trash/Current") will get "" as moint point in default nameservices ns0, then construct monit point (2) subclusterResolver.getMountPoints(src)
and then it be display
getMountPoints is necessary because we will not see all subtrash dirs without it. My way of dealing with it is that for every child path,found its mount point ,and getFileInfo with it . If it is really exits, display it. @Hexiaoqiao @slfan1989 |
Description of PR
As described in HDFS-16749.
Purpose :[RBF] Fix ls user trash path returns mountpoint path that real nameservice's trash path is not exists
There are two nameservices ns0 ns1, and ns0 is the default nameservice.
(1) Add moutTable
(2) add file
(3) mv files to trash
(4) client via DFSRouter: hdfs dfs -ls /user/test-user/.Trash/Current ,this will return
So, this PR is for this purpose, if a namservice that mount point dir in trash is not really exists, it should be not display in user trash view via DFSRouter