sarvekshayr opened a new pull request, #10673:
URL: https://github.com/apache/ozone/pull/10673
## What changes were proposed in this pull request?
Adds `ozone debug scm container export` to run an async export on the SCM
leader. Matching container IDs (by lifecycle and/or health state) are written
as newline-delimited text shards and packed into a TAR under
`{scm.db.dirs}/exports/`. Use `export status --job-id` to check progress;
completed jobs report a fixed elapsedMs and the TAR path. Delete export files
manually when no longer needed.
## What is the link to the Apache JIRA
[HDDS-15496](https://issues.apache.org/jira/browse/HDDS-15496)
## How was this patch tested?
```
# ozone debug scm container export --health-state MISSING
Submitted container ID export job: 8520cf61-05c5-4934-976c-3ebcd36649b0
Export directory on SCM leader: /var/lib/hadoop-ozone/scm/data/exports
Check status with: ozone debug scm container export status --job-id
8520cf61-05c5-4934-976c-3ebcd36649b0
# ozone debug scm container export status --job-id
8520cf61-05c5-4934-976c-3ebcd36649b0
jobId=8520cf61-05c5-4934-976c-3ebcd36649b0
state=SUCCEEDED
totalRows=41,851
elapsedMs=226
exportDir=/var/lib/hadoop-ozone/scm/data/exports
healthState=MISSING
tarPath=/var/lib/hadoop-ozone/scm/data/exports/container-ids-health-MISSING-20260706T064125Z-8520cf61-05c5-4934-976c-3ebcd36649b0.tar
Delete the TAR file on the SCM leader manually when no longer needed.
# cat
container-ids-health-MISSING-20260706T054532Z-6e6891cb-2b86-4964-a36c-0d444b994ca3.tar
container-ids-health-MISSING-2026-07-06T05:45:32Z-part001.txt0100644 0000000
0000000 00001050561 15222640374 021044 0ustar000000000 0000000
# jobId=6e6891cb-2b86-4964-a36c-0d444b994ca3
# timestamp=2026-07-06T05:45:32Z
# healthState=MISSING
# startContainerId=1013
# part=1
# format=container-id-per-line
1013
1016
1034
1054
1055
1075
1088
1102
1103
1120
1136
1137
...
```
--
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]