deepujain opened a new pull request, #8306:
URL: https://github.com/apache/hadoop/pull/8306

   ### Summary
   
   Adds option `fs.s3a.delete.non-empty-directory.enabled`. When true, 
recursive delete of a non-empty directory sends a single delete request for the 
directory key (prefix) instead of listing and bulk-deleting contained objects. 
Only enable for S3-compatible endpoints that support deleting a non-empty 
directory in one request (e.g. 
[VAST](https://kb.vastdata.com/documentation/docs/using-trash-folder-for-s3-objects-6)).
   
   ### Change
   
   - **Constants.java**: New config key `DELETE_NON_EMPTY_DIRECTORY_ENABLED` 
(`fs.s3a.delete.non-empty-directory.enabled`), default `false`.
   - **InternalConstants.java**: Added to `S3A_DYNAMIC_CAPABILITIES` for path 
capability probing.
   - **S3AFileSystem.java**: Read option in `initialize()`, pass to 
`DeleteOperation`, expose via 
`hasPathCapability(DELETE_NON_EMPTY_DIRECTORY_ENABLED)`.
   - **DeleteOperation.java**: New constructor parameter 
`deleteNonEmptyDirectoryEnabled`. When true and directory is non-empty, call 
`deleteObjectAtPath(path, key, false)` once instead of 
`deleteDirectoryTree(path, key)`.
   
   ### JIRA
   
   Fixes HADOOP-19801
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to