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

   ## What changes were proposed in this pull request?
   This pull request introduces a new Ozone CLI command ozone admin namespace 
rebuild that allows administrators to manually trigger a rebuild of the Recon 
Namespace Summary data. The implementation adds both the REST API endpoint in 
Recon and the corresponding CLI subcommand.
   
   **Changes proposed:**
   
   1. **New REST Endpoint**: Added POST `/api/v1/namespace/rebuild` endpoint in 
`NSSummaryEndpoint` class that:
       - Checks if Recon is properly initialized before proceeding
       - Uses the existing unified rebuild control mechanism from 
NSSummaryTask.RebuildState to prevent concurrent rebuilds
       - Triggers asynchronous namespace summary rebuild via 
ReconUtils.triggerAsyncNSSummaryRebuild()
       - Returns appropriate JSON responses indicating rebuild status (STARTED, 
IN_PROGRESS, FAILED, etc.)
   2. **New CLI Subcommand**: Implemented `RebuildSubCommand` class that:
       - Makes HTTP POST request to the Recon rebuild endpoint
       - Provides clear, feedback about rebuild initiation status
       - Handles error scenarios (connection failures, authentication issues, 
server unavailability)
   3. **CLI Integration**: Added the new subcommand to 
`NSSummaryAdmin.subcommands` array to make it available as ozone admin 
namespace rebuild
   
   ## What is the link to the Apache JIRA
   
   https://issues.apache.org/jira/browse/HDDS-13568
   
   ## How was this patch tested?
   
   Tested it out locally 


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