HDDS-13063. Support splitting json output to multiple valid json files in a directory#10604
Open
prathmesh12-coder wants to merge 1 commit into
Open
HDDS-13063. Support splitting json output to multiple valid json files in a directory#10604prathmesh12-coder wants to merge 1 commit into
prathmesh12-coder wants to merge 1 commit into
Conversation
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?
ozone debug replicas verify currently prints all verification results as one large JSON to stdout.
This PR adds support for writing output to a directory as multiple valid JSON files, similar to ozone debug ldb scan.
below options are added:
When set, output is split into files like dirName.0, dirName.1 etc. Each file is valid JSON with a keys array.
If --out is not used, the command still prints JSON to stdout as before.
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-13063
How was this patch tested?
Added integration tests in TestOzoneDebugReplicasVerify:
Verified split files are valid JSON, respect --max-records-per-file, and contain all keys.
Manually tested in local docker-compose Ozone cluster:
confirmed the directory is created, the output is split into numbered valid JSON files, and the run summary is printed.