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

Chris Nauroth commented on HADOOP-13402:
----------------------------------------

Another special case of this is renaming to root.  Even if the behavior 
described above was fixed, an operation like rename("/d1/d2/f1", "/") would 
fail due to this logic at the top of {{S3AFileSystem#innerRename}}:

{code}
    if (srcKey.isEmpty() || dstKey.isEmpty()) {
      LOG.debug("rename: source {} or dest {}, is empty", srcKey, dstKey);
      return false;
    }
{code}

I think we can cover both cases within scope of this issue.

> S3A should allow renaming to a pre-existing destination directory to move the 
> source path under that directory, similar to HDFS.
> --------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-13402
>                 URL: https://issues.apache.org/jira/browse/HADOOP-13402
>             Project: Hadoop Common
>          Issue Type: Sub-task
>          Components: fs/s3
>            Reporter: Rajesh Balamohan
>            Priority: Minor
>
> In HDFS, a rename to a destination path that is a pre-existing directory is 
> interpreted as moving the source path relative to that pre-existing 
> directory.  In S3A, this operation currently fails (does nothing and returns 
> {{false}}), unless that destination directory is empty.  This issue proposes 
> to change S3A to allow this behavior, so that it more closely matches the 
> semantics of HDFS and other file systems.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to