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