Tejaskriya opened a new pull request, #6976:
URL: https://github.com/apache/ozone/pull/6976

   ## 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. Currently, `ozone debug ldb scan` command shows the 
full value for each record being displayed. This could be very verbose and 
include information that is not needed for the use case.
   Having a --fields option which filters the fields being displayed for each 
record will help to get concise output.
   
   For example, if a value has many fields like [name, location->[address, DN, 
IP], version, lastUpdateTime] , using the option 
"--fields=name,location.address,version" will display only (name, address in 
location and version) in the output.
   
   ## What is the link to the Apache JIRA
   
   https://issues.apache.org/jira/browse/HDDS-11190
   
   ## How was this patch tested?
   
   Tested manually in docker cluster:
   ```
   sh-4.2$ ozone debug ldb --db=/data/metadata/om.db scan --cf=fileTable 
--fields=volumeName,bucketName,keyName,keyLocationVersions.locationVersionMap   
      
   { "/-9223372036854775040/-9223372036854774528/-9223372036854771967/k1": {
     "bucketName" : "bb1",
     "volumeName" : "vol1",
     "keyName" : "k1",
     "keyLocationVersions.locationVersionMap" : [ {
       "locationVersionMap" : {
         "0" : [ {
           "blockID" : {
             "containerBlockID" : {
               "containerID" : 1,
               "localID" : 113750153625600003
             },
             "blockCommitSequenceId" : 10
           },
           "length" : 3,
           "offset" : 0,
           "createVersion" : 0,
           "partNumber" : 0
         } ]
       }
     } ]
   }
   , "/-9223372036854775040/-9223372036854774528/-9223372036854774528/k1": {
     "bucketName" : "bb1",
     "volumeName" : "vol1",
     "keyName" : "k1",
     "keyLocationVersions.locationVersionMap" : [ {
       "locationVersionMap" : {
         "0" : [ {
           "blockID" : {
             "containerBlockID" : {
               "containerID" : 1,
               "localID" : 113750153625600001
             },
             "blockCommitSequenceId" : 2
           },
           "length" : 3,
           "offset" : 0,
           "createVersion" : 0,
           "partNumber" : 0
         } ]
       }
     } ]
   }
   ```
   


-- 
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]

Reply via email to