[ https://issues.apache.org/jira/browse/HDFS-17261?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17791913#comment-17791913 ]
ASF GitHub Bot commented on HDFS-17261: --------------------------------------- LiuGuH commented on code in PR #6288: URL: https://github.com/apache/hadoop/pull/6288#discussion_r1411657760 ########## hadoop-hdfs-project/hadoop-hdfs-rbf/src/test/java/org/apache/hadoop/hdfs/server/federation/router/TestRouterMountTable.java: ########## @@ -666,6 +673,25 @@ public void testGetListingWithTrailingSlash() throws IOException { } } + @Test + public void testGetFileInfoWithMountPoint() throws IOException { + try { + // Add mount table entry + MountTable addEntry = MountTable.newInstance("/testgetfileinfo/ns1/dir", + Collections.singletonMap("ns1", "/testgetfileinfo/ns1/dir")); + assertTrue(addMountTable(addEntry)); + nnFs1.mkdirs(new Path("/testgetfileinfo/ns1/dir")); + + FileStatus fileStatus = routerFs.getFileStatus(new Path("/testgetfileinfo/ns1")); + assertTrue(fileStatus.getPath().toString().endsWith("/testgetfileinfo/ns1")); Review Comment: Sure. It is done. Thanks. > RBF: Fix getFileInfo return wrong path when get mountTable path which > multi-level > --------------------------------------------------------------------------------- > > Key: HDFS-17261 > URL: https://issues.apache.org/jira/browse/HDFS-17261 > Project: Hadoop HDFS > Issue Type: Bug > Reporter: liuguanghua > Priority: Minor > Labels: pull-request-available > > With DFSRouter, Suppose there are two nameservices : ns0,ns1 > # Add mountTable /testgetfileinfo/ns1/dir -> (ns1 -> > /testgetfileinfo/ns1/dir) > # hdfs client via DFSRouter accesses a directory: hdfs dfs -ls -d > /testgetfileinfo > # it will return worng path : /testgetfileinfo/testgetfileinfo > -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org