Skip to content

HDDS-14996. Add metrics to track Snapshot backup SST file stats.#10065

Merged
jojochuang merged 4 commits intoapache:masterfrom
jojochuang:HDDS-14996
Apr 13, 2026
Merged

HDDS-14996. Add metrics to track Snapshot backup SST file stats.#10065
jojochuang merged 4 commits intoapache:masterfrom
jojochuang:HDDS-14996

Conversation

@jojochuang
Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

HDDS-14996. Add metrics to track Snapshot backup SST file stats.

Please describe your PR in detail:

  • Added SstBackupDirSize and SstBackupSstFilesCount metrics to OMSnapshotDirectoryMetrics to track disk space usage and file counts for the backup SST
    directory.
  • Refactored calculation logic into a reusable calculateDirSize helper that handles both snapshots and backup SST directories while maintaining
    inode-based deduplication for hard-linked files.
  • Initialized metrics in the constructor to ensure reliability and avoid NullPointerException during testing.
  • Added TestOMSnapshotDirectoryMetrics.java to verify the new metrics and ensured Java 8 compatibility.

What is the link to the Apache JIRA

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

How was this patch tested?

New unit tests

Change-Id: Ib531e9a99d2e98a2e7b2a8ec4e39a3c36cd9aaa0
@jojochuang jojochuang requested a review from sadanand48 April 10, 2026 06:56
@jojochuang jojochuang added the snapshot https://issues.apache.org/jira/browse/HDDS-6517 label Apr 10, 2026
Change-Id: I0c50b044a6d44ea9d4eb0f96e4202d76998c9b41
…Metrics.

Change-Id: I162534c354312e0c33ee7fc4cabb646ac48780c8
Change-Id: I5b70076aa2549f9c2839acf873b8e316c1e85325
@jojochuang jojochuang requested a review from sadanand48 April 11, 2026 00:23
Copy link
Copy Markdown
Contributor

@sadanand48 sadanand48 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @jojochuang for the patch, LGTM

@jojochuang jojochuang marked this pull request as ready for review April 13, 2026 18:05
@jojochuang jojochuang merged commit e407268 into apache:master Apr 13, 2026
59 checks passed
@jojochuang
Copy link
Copy Markdown
Contributor Author

Merged. Thanks @sadanand48

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

metrics snapshot https://issues.apache.org/jira/browse/HDDS-6517

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants