[
https://issues.apache.org/jira/browse/HADOOP-19350?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Chung En Lee updated HADOOP-19350:
----------------------------------
Description:
See [https://github.com/apache/hadoop/pull/6168#issuecomment-1756082091]
They also fail with Apache Ozone. See
https://issues.apache.org/jira/browse/HDDS-11663
Both of these tests expect to throw a FileAlreadyExistsException, while
creating a file that overwrites an existing directory.
The following is a step-by-step description of the test.
# mkdir test/testOverwriteNonEmptyDirectory/ // existing directory
# get test/testOverwriteNonEmptyDirector // start to create
file to overwrite directory
# check the file status of test/testOverwriteNonEmptyDirector
** If it throws FileNotFound then goes to step 4
** check if it is a directory then throw FileAlreadyExistsException
// expect to throw
[here|https://github.com/apache/hadoop/blob/trunk/hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/S3AFileSystem.java#L2196-L2199]
** check if the overwrite is false then throw FileAlreadyExistsException //
# put test/testOverwriteNonEmptyDirector
However, in step 3 it goes to the first check, and put a new object.
S3a is expecting:
Get test/testOverwriteNonEmptyDirector // does not exist
Get test/testOverwriteNonEmptyDirector/ // exists
And it will still throw an exception but not FileAlreadyExistsException.
was:
See [https://github.com/apache/hadoop/pull/6168#issuecomment-1756082091]
They also fail with Apache Ozone. See
https://issues.apache.org/jira/browse/HDDS-11663
Both of these tests expect to throw a FileAlreadyExistsException, while
creating a file that overwrites an existing directory.
The following is a step-by-step description of the test.
# mkdir test/testOverwriteNonEmptyDirectory/ // existing directory
# get test/testOverwriteNonEmptyDirector // start to create
file to overwrite directory
# check the file status of test/testOverwriteNonEmptyDirector
** If it throws FileNotFound then goes to step 4
** check if it is a directory then throw FileAlreadyExistsException //
expect to throw
[here|https://github.com/apache/hadoop/blob/trunk/hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/S3AFileSystem.java#L2196-L2199]
** check if the overwrite is false then throw FileAlreadyExistsException //
[here|https://github.com/apache/hadoop/blob/trunk/hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/S3AFileSystem.java#L2200-L2203]
# put test/testOverwriteNonEmptyDirector
However, in step 3 it goes to the first check, and put a new object.
S3a is expecting:
Get test/testOverwriteNonEmptyDirector // does not exist
Get test/testOverwriteNonEmptyDirector/ // exists
Therefore, when creating a new file, it goes to the first check and put a new
object. It will still throw an exception but not FileAlreadyExistsException.
> ITestS3AContractCreate#testOverwrite*EmptyDirectory fail
> --------------------------------------------------------
>
> Key: HADOOP-19350
> URL: https://issues.apache.org/jira/browse/HADOOP-19350
> Project: Hadoop Common
> Issue Type: Bug
> Affects Versions: 3.4.1
> Reporter: Chung En Lee
> Priority: Minor
>
> See [https://github.com/apache/hadoop/pull/6168#issuecomment-1756082091]
> They also fail with Apache Ozone. See
> https://issues.apache.org/jira/browse/HDDS-11663
> Both of these tests expect to throw a FileAlreadyExistsException, while
> creating a file that overwrites an existing directory.
> The following is a step-by-step description of the test.
> # mkdir test/testOverwriteNonEmptyDirectory/ // existing directory
> # get test/testOverwriteNonEmptyDirector // start to create
> file to overwrite directory
> # check the file status of test/testOverwriteNonEmptyDirector
> ** If it throws FileNotFound then goes to step 4
> ** check if it is a directory then throw FileAlreadyExistsException
> // expect to throw
> [here|https://github.com/apache/hadoop/blob/trunk/hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/S3AFileSystem.java#L2196-L2199]
> ** check if the overwrite is false then throw FileAlreadyExistsException
> //
> # put test/testOverwriteNonEmptyDirector
> However, in step 3 it goes to the first check, and put a new object.
> S3a is expecting:
> Get test/testOverwriteNonEmptyDirector // does not exist
> Get test/testOverwriteNonEmptyDirector/ // exists
> And it will still throw an exception but not FileAlreadyExistsException.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]