hadoop-common-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rod Taylor (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HADOOP-730) Local file system uses copy to implement rename
Date Wed, 03 Oct 2007 16:12:50 GMT

    [ https://issues.apache.org/jira/browse/HADOOP-730?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12532151
] 

Rod Taylor commented on HADOOP-730:
-----------------------------------

Couldn't it try the renameTo() operation and if it fails then fallback to the slower copy&delete
method?

       if (pathToFile(src).renameTo(pathToFile(dst))) {
          return true;
       }
       else {
          return FileUtil.copy(this, src, this, dst, true, getConf());
        }

would replace

        if (useCopyForRename) {
          return FileUtil.copy(this, src, this, dst, true, getConf());
        } else return pathToFile(src).renameTo(pathToFile(dst));

> Local file system uses copy to implement rename
> -----------------------------------------------
>
>                 Key: HADOOP-730
>                 URL: https://issues.apache.org/jira/browse/HADOOP-730
>             Project: Hadoop
>          Issue Type: Bug
>          Components: fs
>    Affects Versions: 0.8.0
>            Reporter: Owen O'Malley
>            Assignee: Owen O'Malley
>
> There is a variable LocalFileSystem.useCopyForRename that is set to true. When true,
the local file system will implement rename as a copy followed by a delete. This is likely
a performance problem. Is there a reason that useCopyForRename is set?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message