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

ASF GitHub Bot commented on HADOOP-19801:
-----------------------------------------

EnricoMi commented on PR #8306:
URL: https://github.com/apache/hadoop/pull/8306#issuecomment-4223921515

   @deepujain how did you test this?
   
   Did you run `ITestS3ADeleteNonEmptyDirectoryCapability` against your VAST S3 
endpoint?
   
   Did you
   1. set `fs.s3a.delete.non-empty-directory.enabled` to `true`?
   2. set `fs.s3a.client.s3.custom.headers` to `x-amz-delete-contents=true`?
   
   With 1., obviously, assertions in tests `testDeleteDeepEmptyDir`, 
`testDeleteNonEmptyDirRecursive` and `testCapabilityDisabledByDefault` fail. 
This is expected because dirs still exist after deletion fails silently.
   
   With 1. and 2., non-delete requests fail for me with `Invalid Argument` 
(`fs.delete` involves non-delete requests):
   ```
   org.apache.hadoop.fs.s3a.AWSBadRequestException: List vask-bucket:/test/ 
delimiter=/ keys=2 requester pays=null on /: 
software.amazon.awssdk.services.s3.model.S3Exception: Invalid Argument 
(Service: S3, Status Code: 400, Request ID: 31f13100005f19, Extended Request 
ID: 31f13100005f19) (SDK Attempt Count: 1):InvalidArgument: Invalid Argument 
(Service: S3, Status Code: 400, Request ID: 31f13100005f19, Extended Request 
ID: 31f13100005f19) (SDK Attempt Count: 1)
        at 
org.apache.hadoop.fs.s3a.S3AUtils.translateException(S3AUtils.java:271)
        at org.apache.hadoop.fs.s3a.Invoker.retryUntranslated(Invoker.java:481)
        at org.apache.hadoop.fs.s3a.Invoker.retryUntranslated(Invoker.java:431)
        at 
org.apache.hadoop.fs.s3a.S3AFileSystem.listObjects(S3AFileSystem.java:3106)
        at 
org.apache.hadoop.fs.s3a.S3AFileSystem.s3GetFileStatus(S3AFileSystem.java:4096)
        at 
org.apache.hadoop.fs.s3a.S3AFileSystem.innerGetFileStatus(S3AFileSystem.java:3987)
        at 
org.apache.hadoop.fs.s3a.S3AFileSystem$MkdirOperationCallbacksImpl.probePathStatus(S3AFileSystem.java:3846)
        at 
org.apache.hadoop.fs.s3a.impl.MkdirOperation.probePathStatusOrNull(MkdirOperation.java:216)
        at 
org.apache.hadoop.fs.s3a.impl.MkdirOperation.getPathStatusExpectingDir(MkdirOperation.java:237)
        at 
org.apache.hadoop.fs.s3a.impl.MkdirOperation.execute(MkdirOperation.java:134)
        at 
org.apache.hadoop.fs.s3a.impl.MkdirOperation.execute(MkdirOperation.java:59)
   ...
   ```
   This is against VAST 5.4.3.1.




> Allow to skip recursive file deletion for non-empty directory
> -------------------------------------------------------------
>
>                 Key: HADOOP-19801
>                 URL: https://issues.apache.org/jira/browse/HADOOP-19801
>             Project: Hadoop Common
>          Issue Type: New Feature
>          Components: fs/s3
>            Reporter: Enrico Minack
>            Priority: Major
>              Labels: pull-request-available
>
> A non-empty directory, as well as a directory where its emptiness is unknown, 
> is deleted by listing all contained files (or objects with matching key 
> prefix), then deleting those files (objects) in bulk delete requests, and 
> finally deleting the (then) empty directory itself.
> The recursive deletion of objects is not needed for S3 endpoints that support 
> deleting non-empty directories (or path prefixes).
> For example: The [VAST S3 endpoint supports deleting non-empty 
> directories|https://kb.vastdata.com/documentation/docs/using-trash-folder-for-s3-objects-6]
>  with a single request. Such a feature can only be fully leveraged if 
> {{hadoop-aws}} coupd skip the recursive deletion.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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

Reply via email to