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

Benoit Perroud commented on HDFS-5902:
--------------------------------------

[~asanderson]: good feedbacks. Having the same parent makes sense. 
Symlinks, append, snapshots etc are features that are not implemented in every 
other filesystems, or are they? I mean, shall we keep the set of features to 
the smallest common subset, or like rename function add a comment warning about 
difference of implementation?

> Atomic Directory Swapping Operation
> -----------------------------------
>
>                 Key: HDFS-5902
>                 URL: https://issues.apache.org/jira/browse/HDFS-5902
>             Project: Hadoop HDFS
>          Issue Type: New Feature
>          Components: namenode
>    Affects Versions: 2.2.0
>            Reporter: Benoit Perroud
>            Priority: Minor
>
> With snapshots, we can already start to have a consistent view of the data 
> over time.
> One missing primitive to do one more step in the direction of a transactional 
> FS is the ability to swap atomically two folders:
> {code}
> swapFolders(src, dst)
> {code}
> As of today, we need to:
> 1. move the destination folder to a temporary name, 
> 2. rename the source folder in destination's name
> 3. rename the dst folder with the temporary name in the source name.
> This can leads to race conditions where the data is not found.
> An operation inside the namenode achieving folders swapping, with the 
> appropriate checks and locking to ensure atomicity, would be really useful to 
> perform maintenance tasks like folder compation, format conversion, etc... 
> (and lot of other use cases).



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to