Unified --Json output#6419
Open
ArbaazKhan1 wants to merge 10 commits into
Open
Conversation
Contributor
Author
|
What the Json output would look like for `accumulo inst service-status --json {
"command": "accumulo admin service-status",
"version": "1.0",
"reportTime": "2026-06-09T20:20:01Z",
"status": "OK",
"data": {
"reportTime": "2026-06-09T20:20:01.889Z",
"zkReadErrors": 0,
"showHosts": false,
"summaries": {
"COMPACTOR": {
"resourceGroups": {
"default": 1
},
"serviceByGroups": {
"default": [
"localhost:9600"
]
},
"serviceCount": 1,
"errorCount": 0
},
"GC": {
"resourceGroups": {
"default": 1
},
"serviceByGroups": {
"default": [
"localhost:9998"
]
},
"serviceCount": 1,
"errorCount": 0
},
"MANAGER": {
"resourceGroups": {
"default": 1
},
"serviceByGroups": {
"default": [
"localhost:9999"
]
},
"serviceCount": 1,
"errorCount": 0
},
"MONITOR": {
"resourceGroups": {
"default": 1
},
"serviceByGroups": {
"default": [
"localhost:9995"
]
},
"serviceCount": 1,
"errorCount": 0
},
"S_SERVER": {
"resourceGroups": {
"default": 1
},
"serviceByGroups": {
"default": [
"localhost:9700"
]
},
"serviceCount": 1,
"errorCount": 0
},
"T_SERVER": {
"resourceGroups": {
"default": 1
},
"serviceByGroups": {
"default": [
"localhost:9800"
]
},
"serviceCount": 1,
"errorCount": 0
}
}
}
} |
dlmarion
reviewed
Jun 22, 2026
DomGarguilo
requested changes
Jul 8, 2026
DomGarguilo
left a comment
Member
There was a problem hiding this comment.
Trying out some commands and things are looking good. I did find one discrepency that I think is caused by these changes. I tried accumulo inst service-status --json and realized the serviceByGroups field is printed even though it only should be when --showHosts is provided too. I think the logic that excludes that field from the output is broken now since the new envelope code serializes the ServiceStatusReport object directly instead of using its existing toJson() method. Probably need to update ServiceStatusReport.getData()
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.
addresses issue #6391
To make a universal
--jsonflag I moved it fromFateandServiceStatusand intoServerOptsso all commands inherit it. Added a newCommandOutputEnvelopeclass that will take accumulo JSON outputs and wraps them in an envelope for a unified output and a newCommandReportinterface that report classes will inherit so they can produce both human-readable and computer readable lines. Started by wiring upfate --summaryandservice-statusas the two proof-of-concept commands since both already have partial JSON support