[
https://issues.apache.org/jira/browse/HADOOP-3591?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12608145#action_12608145
]
Doug Cutting commented on HADOOP-3591:
--------------------------------------
Comparing URIs for equality is certainly better than comparing FileSystem
instances, but I'm not convinced this is in general a solvalble problem: we
won't ever be able to guarantee that two URIs don't refer to the same file. An
FTP server could refer to the same file as an HTTP server, etc.
I would support switching things from FileSystem instance equality to URI
equality as an improvement, but I don't think it is worth our while to invest
in a more elaborate equality mechanism.
> org.apache.hadoop.fs.FileUtil.checkDependencies may want to use .equals()
> instead of ==
> ---------------------------------------------------------------------------------------
>
> Key: HADOOP-3591
> URL: https://issues.apache.org/jira/browse/HADOOP-3591
> Project: Hadoop Core
> Issue Type: Bug
> Components: fs
> Affects Versions: 0.18.0
> Reporter: Steve Loughran
> Priority: Minor
>
> org.apache.hadoop.fs.FileUtil.checkDependencies checks for source overwriting
> dest by first checking for filesystem equality:
> if (srcFS == dstFS) {
> ..more checks here
> }
> So, its assuming that you can check filesystem by pointer equality, whereas
> if you create two filesystems and initialise them, they will still refer to
> the same remoteFS.
> Consider assuming URI equality ==filesystem equality, and either to do a
> FileSystem.equals() that checks that , or do the check in
> FileUtil.getDependencies
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.