[ 
https://issues.apache.org/jira/browse/HADOOP-3591?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12608034#action_12608034
 ] 

Steve Loughran commented on HADOOP-3591:
----------------------------------------

well, some of the FileUtil and FsShell operations do equality tests either on 
instance (very bad) or uri. If we need a robust way to distinguish filesystems 
*and URI is inadequate*, then the only alternative would be for the far end to 
provide some unique ID. This could be a persistent ID of the FS itself, or it 
could be something created whenenver a name node or other filesystem comes up.

> 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.

Reply via email to