LiuGuH commented on code in PR #6291: URL: https://github.com/apache/hadoop/pull/6291#discussion_r1402860528
########## hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/resolver/MountTableResolver.java: ########## @@ -357,7 +357,7 @@ public void refreshEntries(final Collection<MountTable> entries) { @VisibleForTesting public static boolean isTrashPath(String path) throws IOException { Pattern pattern = Pattern.compile( - "^" + getTrashRoot() + TRASH_PATTERN + "/"); + "^" + getTrashRoot() + TRASH_PATTERN); Review Comment: Fox example , If we don't remove / , client executes command: ls /user/*/.Trash/Current, it will only return the defalut nameservice trash path. The test case is in org.apache.hadoop.hdfs.server.federation.router.TestRouterTrash#testMultipleMountPoint , ` FileStatus[] fileStatuses = fs.listStatus(new Path("/user/test-trash/.Trash/Current/")); assertEquals(3, fileStatuses.length);` If we don't remove / , fileStatuses.length will be 1. Thanks. -- 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. To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org 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