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

   ## What changes were proposed in this pull request?
   **Problem:** Currently, exporting a large number of unhealthy container 
records (e.g., Missing, Under-Replicated, Mis-Replicated, etc.) from Recon is 
difficult. The UI is paginated and cannot efficiently handle downloading 
millions of records. Administrators often have to rely on manual, non-scalable 
database extraction methods (like connecting the Derby `ij` client) to analyze 
cluster health data.
   
   **Solution:** This ticket implements a native, scalable CSV export feature 
directly in the Recon UI and Backend.
   
   1. **Frontend:** Added an "Export CSV" button to the Recon Containers page 
with a dropdown selector allowing administrators to quickly extract data blocks 
ranging from 10K up to 5 Million records based on their currently active 
diagnostic tab (Missing, Under-Replicated, etc).
   2. **Backend:** Added a new REST endpoint 
(`/api/v1/containers/unhealthy/export`) that uses jOOQ cursors and JAX-RS 
`StreamingOutput` to fetch and stream records lazily. By piping data directly 
from the Derby database to the HTTP response, the JVM heap memory is protected 
from OutOfMemory (OOM) errors, regardless of scale.
   3. **Security & Limits:** The endpoint sits behind Recon's robust 
`@AdminOnly` authorization. Additionally, a new configuration property 
`ozone.recon.csv.export.max.records` (default: 5,000,000) was introduced to 
forcefully cap exports, protecting the server connection pool and worker 
threads from accidental misuse or abuse.
   
   ## What is the link to the Apache JIRA
   https://issues.apache.org/jira/browse/HDDS-14902
   
   ## How was this patch tested?
   Tested out with 4 million containers 1 million for each unhealthy state.


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