ozone icon indicating copy to clipboard operation
ozone copied to clipboard

HDDS-13734. Create debug tool for inspecting the contents of container checksum file

Open aswinshakil opened this issue 3 months ago • 2 comments

What changes were proposed in this pull request?

Create debug tools for inspecting container merkle trees locally on a datanode.

Inspecting a single container's content and checksums could also be done with the file.

  • ozone debug datanode container checksum <tree1>

What is the link to the Apache JIRA

https://issues.apache.org/jira/browse/HDDS-13734

How was this patch tested?

Added Unit tests

Sample JSON output

[ {
  "containerID" : 12345,
  "containerMerkleTree" : {
    "dataChecksum" : "f62520b4",
    "blockMerkleTrees" : [ {
      "blockID" : 1,
      "deleted" : false,
      "dataChecksum" : "e88231c3",
      "chunkMerkleTrees" : [ {
        "offset" : 0,
        "length" : 4194304,
        "checksumMatches" : true,
        "dataChecksum" : "f130f21e"
      }, {
        "offset" : 1,
        "length" : 4194304,
        "checksumMatches" : true,
        "dataChecksum" : "85331923"
      }, {
        "offset" : 2,
        "length" : 4194304,
        "checksumMatches" : true,
        "dataChecksum" : "f132df67"
      }, {
        "offset" : 3,
        "length" : 4194304,
        "checksumMatches" : true,
        "dataChecksum" : "f3ea6b43"
      } ]
    }, {
      "blockID" : 2,
      "deleted" : false,
      "dataChecksum" : "75c48c87",
      "chunkMerkleTrees" : [ {
        "offset" : 0,
        "length" : 4194304,
        "checksumMatches" : true,
        "dataChecksum" : "c9620575"
      }, {
        "offset" : 1,
        "length" : 4194304,
        "checksumMatches" : true,
        "dataChecksum" : "cdc4009e"
      }, {
        "offset" : 2,
        "length" : 4194304,
        "checksumMatches" : true,
        "dataChecksum" : "ae085dad"
      }, {
        "offset" : 3,
        "length" : 4194304,
        "checksumMatches" : true,
        "dataChecksum" : "1e588f83"
      } ]
    }, {
      "blockID" : 3,
      "deleted" : false,
      "dataChecksum" : "41524ae2",
      "chunkMerkleTrees" : [ {
        "offset" : 0,
        "length" : 4194304,
        "checksumMatches" : true,
        "dataChecksum" : "81951cc8"
      }, {
        "offset" : 1,
        "length" : 4194304,
        "checksumMatches" : true,
        "dataChecksum" : "f596f7f5"
      }, {
        "offset" : 2,
        "length" : 4194304,
        "checksumMatches" : true,
        "dataChecksum" : "f13a6a83"
      }, {
        "offset" : 3,
        "length" : 4194304,
        "checksumMatches" : true,
        "dataChecksum" : "62045839"
      } ]
    } ]
  }
} ]

aswinshakil avatar Oct 02 '25 23:10 aswinshakil

Thanks for the review @errose28 . Updated the PR as per review comments.

aswinshakil avatar Oct 06 '25 21:10 aswinshakil

This PR has been marked as stale due to 21 days of inactivity. Please comment or remove the stale label to keep it open. Otherwise, it will be automatically closed in 7 days.

github-actions[bot] avatar Nov 29 '25 00:11 github-actions[bot]

This PR has been marked as stale due to 21 days of inactivity. Please comment or remove the stale label to keep it open. Otherwise, it will be automatically closed in 7 days.

github-actions[bot] avatar Dec 25 '25 00:12 github-actions[bot]