[
https://issues.apache.org/jira/browse/HDFS-16216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18040463#comment-18040463
]
ASF GitHub Bot commented on HDFS-16216:
---------------------------------------
github-actions[bot] closed pull request #3415: HDFS-16216. RBF: Wrong path when
get mount point status
URL: https://github.com/apache/hadoop/pull/3415
> RBF: Wrong path when get mount point status
> -------------------------------------------
>
> Key: HDFS-16216
> URL: https://issues.apache.org/jira/browse/HDFS-16216
> Project: Hadoop HDFS
> Issue Type: Bug
> Reporter: zhuobin zheng
> Assignee: zhuobin zheng
> Priority: Major
> Labels: pull-request-available
> Time Spent: 1h 20m
> Remaining Estimate: 0h
>
> When we get mount point status, we will get wrong path in file status.
> {code:java}
> // prepare mount env
> hdfs dfsrouteradmin -add /test ns1 /test
> hdfs dfsrouteradmin -add /test/test1/test2/test3 ns1 /test/test1/test2/test3
> {code}
> {code:java}
> // java code
> public class TmpOp {
> public static void main(String[] args) throws Exception {
> Configuration conf = new HdfsConfiguration();
> FileSystem fs = FileSystem.get(conf);
> FileStatus test = fs.getFileStatus(new Path("/test"));
> FileStatus test1 = fs.getFileStatus(new Path("/test/test1"));
> FileStatus test2 = fs.getFileStatus(new Path("/test/test1/test2"));
> System.out.println(test.getPath());
> System.out.println(test1.getPath());
> System.out.println(test2.getPath());
> }
> }
> {code}
>
> {code:java}
> // result
> hdfs://ns1/test/test
> hdfs://ns1/test/test1/test1
> hdfs://ns1/test/test1/test2/test2
> {code}
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]