ashishkumar50 opened a new pull request, #4981:
URL: https://github.com/apache/ozone/pull/4981

   ## What changes were proposed in this pull request?
   
   Currently recursive bucket delete is supported only using fs command. But fs 
can be used only for FSO and Legacy bucket. Currently there is no way for user 
to do recursive delete bucket in easy way for all the bucket types.
   In this PR, As sh can be used for all bucket types, using ozone sh command 
user can now perform bucket delete recursively.
   
   
   Description about new the command:
   
   - Try delete bucket without recursive when bucket is non-empty.
   
   ```
   ozone sh bucket delete o3://localhost:9862/vol1/bucket1
   BUCKET_NOT_EMPTY Bucket is not empty
   ```
   
   - Use -r for recursive bucket delete. Interactive confirmation before 
delete, if input is other than "yes" then make operation cancelled.
   
   ```
   ozone sh bucket delete -r -id localhost:9862 o3://localhost:9862/vol1/bucket1
   This command will delete bucket recursively.
   There is no recovery option after using this command, and no trash for FSO 
buckets.
   Enter 'yes' to proceed': no
   Operation cancelled.
   ```
   
   - Interactive confirmation before recursive delete, Enter "yes" then bucket 
should be deleted
   
   ```
   ozone sh bucket delete -r -id localhost:9862 o3://localhost:9862/vol1/bucket1
   This command will delete bucket recursively.
   There is no recovery option after using this command, and no trash for FSO 
buckets.
   Enter 'yes' to proceed': yes
   Bucket bucket1 is deleted
   ```
   
   - Override interactive confirmation by giving "--yes" while running command 
itself
   
   ```
   ozone sh bucket delete -r -id localhost:9862 --yes 
o3://localhost:9862/vol1/bucket1
   Bucket bucket1 is deleted
   
   ```
   ## What is the link to the Apache JIRA
   
   https://issues.apache.org/jira/browse/HDDS-8909
   
   ## How was this patch tested?
   
   Added new integration test and verified.
   


-- 
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