[
https://issues.apache.org/jira/browse/HADOOP-17157?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Steve Loughran updated HADOOP-17157:
------------------------------------
Summary: S3A rename operation not the same as HDFS when dest is empty dir
(was: S3A rename operation not the same with HDFS)
> S3A rename operation not the same as HDFS when dest is empty dir
> ----------------------------------------------------------------
>
> Key: HADOOP-17157
> URL: https://issues.apache.org/jira/browse/HADOOP-17157
> Project: Hadoop Common
> Issue Type: Bug
> Components: fs/s3
> Affects Versions: 3.2.1
> Reporter: Jiajia Li
> Priority: Minor
>
> 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: [email protected]
For additional commands, e-mail: [email protected]