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

   ## What changes were proposed in this pull request?
   The `ozone debug replicas chunk-info` command now provides detailed 
information about the chunks associated with a given key. Previously, 
chunk-related details were only available when the `--verbose` flag was used. 
With this update, the command now includes the BlockData retrieved from the 
getBlock call, along with additional details.
   
   ## What is the link to the Apache JIRA
   [HDDS-12645](https://issues.apache.org/jira/browse/HDDS-12645)
   
   ## How was this patch tested?
   Tested on a docker cluster.
   1. Chunk-info for a RATIS/ONE key.
   ```
   bash-5.1$ ozone debug replicas chunk-info vol1/buck1/ratiskey
   {
     "Volume-Name" : "vol1",
     "Bucket-Name" : "buck1",
     "Key-Name" : "ratiskey",
     "KeyLocations" : [ [ {
       "Datanode-HostName" : "ozone-datanode-9.ozone_default",
       "Datanode-IP" : "172.23.0.10",
       "Block-Data" : {
         "blockID" : {
           "containerID" : "2",
           "localID" : "115816896921600002",
           "blockCommitSequenceId" : "2"
         },
         "metadata" : [ {
           "key" : "TYPE",
           "value" : "KEY"
         } ],
         "chunks" : [ {
           "chunkName" : "115816896921600002_chunk_1",
           "offset" : "0",
           "len" : "6",
           "checksumData" : {
             "type" : "CRC32",
             "bytesPerChecksum" : 16384,
             "checksums" : [ "NjowIA==" ]
           }
         } ],
         "size" : "6"
       },
       "Chunk-Files" : [ 
"/data/hdds/hdds/CID-51ccaf4d-4e84-4e6a-870d-37020ab4210d/current/containerDir0/2/chunks/115816896921600002.block"
 ]
     } ] ]
   }
   
   ```
   2. Chunk-info for EC/3-2-1024 key
   ```
   bash-5.1$ ozone debug replicas chunk-info vol1/buck1/eckey
   {
     "Volume-Name" : "vol1",
     "Bucket-Name" : "buck1",
     "Key-Name" : "eckey",
     "KeyLocations" : [ [ {
       "Datanode-HostName" : "ozone-datanode-7.ozone_default",
       "Datanode-IP" : "172.23.0.15",
       "Block-Data" : { },
       "Chunk-Files" : [ ],
       "Chunk-Type" : "PARITY"
     }, {
       "Datanode-HostName" : "ozone-datanode-2.ozone_default",
       "Datanode-IP" : "172.23.0.8",
       "Block-Data" : {
         "blockID" : {
           "containerID" : "1",
           "localID" : "115816896921600001",
           "blockCommitSequenceId" : "0",
           "replicaIndex" : 1
         },
         "metadata" : [ {
           "key" : "TYPE",
           "value" : "KEY"
         }, {
           "key" : "blockGroupLen",
           "value" : "6"
         } ],
         "chunks" : [ {
           "chunkName" : "115816896921600001_chunk_1",
           "offset" : "0",
           "len" : "6",
           "checksumData" : {
             "type" : "CRC32",
             "bytesPerChecksum" : 16384,
             "checksums" : [ "NjowIA==" ]
           },
           "stripeChecksum" : "NjowILKNOXFUxwVt"
         } ],
         "size" : "6"
       },
       "Chunk-Files" : [ 
"/data/hdds/hdds/CID-51ccaf4d-4e84-4e6a-870d-37020ab4210d/current/containerDir0/1/chunks/115816896921600001.block"
 ],
       "Chunk-Type" : "DATA"
     }, {
       "Datanode-HostName" : "ozone-datanode-4.ozone_default",
       "Datanode-IP" : "172.23.0.14",
       "Block-Data" : { },
       "Chunk-Files" : [ ],
       "Chunk-Type" : "DATA"
     }, {
       "Datanode-HostName" : "ozone-datanode-8.ozone_default",
       "Datanode-IP" : "172.23.0.7",
       "Block-Data" : { },
       "Chunk-Files" : [ ],
       "Chunk-Type" : "PARITY"
     }, {
       "Datanode-HostName" : "ozone-datanode-9.ozone_default",
       "Datanode-IP" : "172.23.0.10",
       "Block-Data" : { },
       "Chunk-Files" : [ ],
       "Chunk-Type" : "DATA"
     } ] ]
   }
   
   ```
   


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