[
https://issues.apache.org/jira/browse/HADOOP-11452?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Steve Loughran updated HADOOP-11452:
------------------------------------
Attachment: HADOOP-11452-001.patch
Patch 001
# makes the method public, undeprecated, including all subclasses.
# I'm stopped at the raised issues "what happens with src==dest" and the src
under dest, dest under src issues. Someone else needs to look at the code and
say what they think it does.
# Looking at HDFS. dst==src raises {{FileAlreadyExistsException}}
{code}
if (dst.equals(src)) {
throw new FileAlreadyExistsException("The source " + src +
" and destination " + dst + " are the same");
}
{code}
# HDFS also raises IOE if dest is under src. It also rejects renames to
reserved paths, with an error message which isn't always correct.
> Revisit FileSystem.rename(path, path, options)
> ----------------------------------------------
>
> Key: HADOOP-11452
> URL: https://issues.apache.org/jira/browse/HADOOP-11452
> Project: Hadoop Common
> Issue Type: Task
> Components: fs
> Affects Versions: 2.7.3
> Reporter: Yi Liu
> Assignee: Steve Loughran
> Attachments: HADOOP-11452-001.patch
>
>
> Currently in {{FileSystem}}, {{rename}} with _Rename options_ is protected
> and with _deprecated_ annotation. And the default implementation is not
> atomic.
> So this method is not able to be used outside. On the other hand, HDFS has a
> good and atomic implementation. (Also an interesting thing in {{DFSClient}},
> the _deprecated_ annotations for these two methods are opposite).
> It makes sense to make public for {{rename}} with _Rename options_, since
> it's atomic for rename+overwrite, also it saves RPC calls if user desires
> rename+overwrite.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]