You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Jiajia Li (Jira)" <ji...@apache.org> on 2020/07/27 12:14:00 UTC

[jira] [Created] (HADOOP-17157) S3A rename operation not the same with HDFS

Jiajia Li created HADOOP-17157:
----------------------------------

             Summary: S3A rename operation not the same with HDFS
                 Key: HADOOP-17157
                 URL: https://issues.apache.org/jira/browse/HADOOP-17157
             Project: Hadoop Common
          Issue Type: Bug
          Components: fs/s3
            Reporter: Jiajia Li


When I run the test ITestS3ADeleteManyFiles, I change the [https://github.com/apache/hadoop/blob/trunk/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/scale/ITestS3ADeleteManyFiles.java#L97]

to 

{code}

fs.mkdirs(finalDir);

{code}

So before rename operator, "finalParent/final" has been created.

But after the rename operation,  all the files will be moved from "srcParent/src" to "finalParent/final"

So this is not the same with the HDFS rename operation:

HDFS rename includes the calculation of the destination path. If the destination exists and is a directory, the final destination of the rename becomes the destination + the filename of the source path.
let dest = if (isDir(FS, src) and d != src) :
        d + [filename(src)]
    else :
        d



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org