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

Yi Liu commented on HADOOP-11452:
---------------------------------

My proposal is to make public for {{rename}} with _Rename options_, and the 
default implementation is to throw some type of exception, also we should 
require implementation atomicity in the method doc.
Since currently this method is protected, it will not break compatibility.

Furthermore, there are 2 invokes to this method but with 
{{Options.Rename.NONE}}, in that situation, we should use the overload 
{{rename}} without _Rename options_ instead. 

Then we can also add overwrite option for {{fs mv}}.

> Revisit FileSystem#rename
> -------------------------
>
>                 Key: HADOOP-11452
>                 URL: https://issues.apache.org/jira/browse/HADOOP-11452
>             Project: Hadoop Common
>          Issue Type: Task
>          Components: fs
>            Reporter: Yi Liu
>            Assignee: Yi Liu
>
> 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)

Reply via email to