Tejaskriya opened a new pull request, #6914: URL: https://github.com/apache/ozone/pull/6914
## What changes were proposed in this pull request? RocksDB stores data in key-value pairs. The value itself may have some kind of key-value structure. A command is needed which shows what structure this value has and prints the same. This would help in parsing and filtering the output of `ozone debug ldb scan` command to obtain only the required details from the value. In this PR, java reflections has been used to fetch the fields of the value type of a rocksDB for the first 2 hierarchical levels. ## What is the link to the Apache JIRA https://issues.apache.org/jira/browse/HDDS-11117 ## How was this patch tested? Tested manually in docker setup, also added test in TestLDBCli. Sample output: ``` sh-4.2$ ozone debug ldb --db=/data/metadata/om.db schema --cf=keyTable { "bucketName" : [ ], "metadata" : [ ], "fileName" : [ ], "creationTime" : [ ], "isFile" : [ ], "acls" : [ "type", "name", "aclBits", "aclScope", "toStringMethod", "hashCodeMethod" ], "keyName" : [ ], "replicationConfig" : [ ], "encInfo" : [ "cipherSuite", "version", "edek", "iv", "keyName", "ezKeyVersionName" ], "dataSize" : [ ], "tags" : [ ], "keyLocationVersions" : [ "version", "locationVersionMap", "isMultipartKey" ], "updateID" : [ ], "ownerName" : [ ], "modificationTime" : [ ], "parentObjectID" : [ ], "volumeName" : [ ], "fileChecksum" : [ ], "objectID" : [ ] } ``` -- 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]
