[
https://issues.apache.org/jira/browse/HADOOP-10392?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14075637#comment-14075637
]
Benjamin Zhitomirsky commented on HADOOP-10392:
-----------------------------------------------
Please pay attention that using FileSystem.makeQualified(path) is a bug in some
cases. Consider the following:
In conf: fs.defaultName="hdfs://nn1:8020"
FileSystem.get(conf).makeQualified("hdfs://nn2:8021/dir/subdir/file");
This will fail with the exception:
org.apache.hadoop.fs.InvalidPathException: Invalid path name Wrong FS:
hdfs://nn2:8021/dir/subdir/file, expected: hdfs://nn1:8020
Please consider this in your fix.
The following call does it right:
FileContext.getFileContext(conf).makeQualified(path);
> Use FileSystem#makeQualified(Path) instead of Path#makeQualified(FileSystem)
> ----------------------------------------------------------------------------
>
> Key: HADOOP-10392
> URL: https://issues.apache.org/jira/browse/HADOOP-10392
> Project: Hadoop Common
> Issue Type: Sub-task
> Components: fs
> Affects Versions: 2.3.0
> Reporter: Akira AJISAKA
> Assignee: Akira AJISAKA
> Priority: Minor
> Labels: newbie
> Attachments: HADOOP-10392.2.patch, HADOOP-10392.3.patch,
> HADOOP-10392.4.patch, HADOOP-10392.4.patch, HADOOP-10392.patch
>
>
> There're some methods calling Path.makeQualified(FileSystem), which causes
> javac warning.
--
This message was sent by Atlassian JIRA
(v6.2#6252)