HDDS-14913. Implement Scalable CSV Export for Unhealthy Containers in Recon UI.#10162
Draft
ArafatKhan2198 wants to merge 1 commit intoapache:masterfrom
Draft
HDDS-14913. Implement Scalable CSV Export for Unhealthy Containers in Recon UI.#10162ArafatKhan2198 wants to merge 1 commit intoapache:masterfrom
ArafatKhan2198 wants to merge 1 commit intoapache:masterfrom
Conversation
Contributor
|
@ArafatKhan2198 as discussed, please design the solution server based for single Recon user. We don't have user based logins in Recon. We should not localize the logic at browser for job progress. All browser windows opened in multiple machines opening the recon page should see the same job and its progress. At a time only job should be allowed to run and remaining 2 should go in queue. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
ExportJobA small record of one export run: who asked (
userId), which unhealthy type (state), job id, current stage (queued / running / done / failed), how many rows written so far, an estimate of total rows (for a percent), where the TAR file will live, any error text, and queue position while it’s waiting. Think of it as the status object the API returns to the UI.ExportJobManagerThe brain of the feature. It accepts new export requests, queues them (up to a fixed max), runs them one at a time on a background thread, reads unhealthy rows from the DB in a streaming way, writes CSV files in chunks (e.g. 500k rows per file), packs them into a TAR, deletes temporary CSV folders, and updates the job’s status. It also handles cancel (stop work, clean up) and shutdown when Recon stops.
ContainerEndpointThe HTTP layer for containers. For exports it exposes: start an export (
POST), check status (GETwith job id), download the finished TAR (GET…/download), and cancel (DELETE). It checks thatstateis valid, callsExportJobManager, and turns “queue full” into a 429 Too Many Requests style response.ContainerHealthSchemaManagerAlready knows how to talk to Recon’s Derby unhealthy-container data. New pieces:
getUnhealthyContainersCount— “how many rows will this export roughly have?” (for progress), andgetUnhealthyContainersCursor— a streaming cursor over rows for a given unhealthy state so the export doesn’t load millions of rows into memory at once.containers.tsx(Recon UI)`The Containers page: adds an “Export CSV” button for the currently selected unhealthy tab. It starts the job, polls every few seconds for status, shows queued / runn
Config keys (in
ReconServerConfigKeys)Not a config (hardcoded in
ExportJobManager)What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-14913
How was this patch tested?
Log Changes -
video2985213205.mp4