sarvekshayr opened a new pull request, #8248: URL: https://github.com/apache/ozone/pull/8248
## What changes were proposed in this pull request? Make `ozone debug replicas verify` output json information about each key and the checks that were run on it. As new checks are added, their results will be included in the same json objects. By default we skip output for keys that passed all the specified checks. ## What is the link to the Apache JIRA [HDDS-12207](https://issues.apache.org/jira/browse/HDDS-12207) ## How was this patch tested? When all checks are passed (by default prints only the keys with failed check/s) ``` bash-5.1$ ozone debug replicas verify --checksums --block-existence / --output-dir / { "keys" : [ ] } ``` Pass `--all` to show all keys ``` bash-5.1$ ozone debug replicas verify --checksums --block-existence / --output-dir / --all { "keys" : [ { "volumeName" : "ockrwvolume", "bucketName" : "ockrwbucket", "name" : "kcbwx5pqse/a87ff67", "blocks" : [ { "containerID" : 5, "localID" : 115816896921600009, "replicas" : [ { "datanode" : { "uuid" : "3fe242f3-542f-42ef-aa49-290bc1a8757b", "hostname" : "ozone-datanode-6.ozone_default" }, "checks" : [ { "type" : "checksum", "pass" : true, "failures" : [ ] }, { "type" : "blockExistence", "pass" : true, "failures" : [ ] } ] } ] } ], "pass" : true }, { "volumeName" : "ockrwvolume", "bucketName" : "ockrwbucket", "name" : "kcbwx5pqse/c4ca423", "blocks" : [ { "containerID" : 6, "localID" : 115816896921600008, "replicas" : [ { "datanode" : { "uuid" : "6b40b1f2-3749-4996-a937-861ee54050ae", "hostname" : "ozone-datanode-7.ozone_default" }, "checks" : [ { "type" : "checksum", "pass" : true, "failures" : [ ] }, { "type" : "blockExistence", "pass" : true, "failures" : [ ] } ] } ] } ], "pass" : true } ] } ``` When there is a failure ``` bash-5.1$ ozone debug replicas verify --checksums --block-existence / --output-dir / { "keys" : [ { "volumeName" : "ockrwvolume", "bucketName" : "ockrwbucket", "name" : "kcbwx5pqse/a87ff67", "blocks" : [ { "containerID" : 5, "localID" : 115816896921600009, "replicas" : [ { "datanode" : { "uuid" : "3fe242f3-542f-42ef-aa49-290bc1a8757b", "hostname" : "ozone-datanode-6.ozone_default" }, "checks" : [ { "type" : "checksum", "pass" : false, "failures" : [ { "present" : true, "message" : "java.util.concurrent.ExecutionException: org.apache.ratis.thirdparty.io.grpc.StatusRuntimeException: UNAVAILABLE: io exception" } ] }, { "type" : "blockExistence", "pass" : false, "failures" : [ { "present" : true, "message" : "Block does not exist on this replica" } ] } ] } ] } ], "pass" : false } ] } ``` When there are no replicas for a key ``` bash-5.1$ ozone debug replicas verify --checksums --block-existence / --output-dir / { "keys" : [ { "volumeName" : "ockrwvolume", "bucketName" : "ockrwbucket", "name" : "kcbwx5pqse/a87ff67", "blocks" : [ { "containerID" : 5, "localID" : 115816896921600009, "replicas" : [ ] } ], "pass" : false } ] } ``` -- 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]
