Skip to content

HDDS-15446. Expose Hard Min Free Space Threshold via JMX#10575

Open
anuragp010 wants to merge 1 commit into
apache:masterfrom
anuragp010:hdds-15446
Open

HDDS-15446. Expose Hard Min Free Space Threshold via JMX#10575
anuragp010 wants to merge 1 commit into
apache:masterfrom
anuragp010:hdds-15446

Conversation

@anuragp010

@anuragp010 anuragp010 commented Jun 22, 2026

Copy link
Copy Markdown

What changes were proposed in this pull request?

The hard minimum free space threshold is not available via JMX on Datanodes. The write path rejection logic uses the hard threshold, which is exposed through the getFreeSpaceToSpare method on HddsVolume. This PR exposes the metric in JMX.

What is the link to the Apache JIRA

HDDS-15446

How was this patch tested?

  1. Unit test was updated.
  2. Tested Manually:
bash-5.1$ curl -XGET http://ozone-datanode-1:9882/jmx?qry=Hadoop:service=HddsDatanode,name=VolumeInfoMetrics-/data/hdds
{
  "beans" : [ {
    "name" : "Hadoop:service=HddsDatanode,name=VolumeInfoMetrics-/data/hdds",
    "modelerType" : "VolumeInfoMetrics-/data/hdds",
    "tag.Context" : "ozone",
    "tag.DatanodeUuid" : "5fa333c2-71a4-43bc-b95f-968a925cefa6",
    "tag.StorageType" : "DISK",
    "tag.VolumeType" : "DATA_VOLUME",
    "tag.StorageDirectory" : "/data/hdds/hdds",
    "tag.VolumeState" : "NORMAL",
    "tag.Hostname" : "3319dfbfbcbf",
    "AvailableSpaceInsufficient" : 0,
    "DbCompactLatencyNumOps" : 0,
    "DbCompactLatencyAvgTime" : 0.0,
    "NumContainerCreateRequestsInSoftBandMinFreeSpace" : 0,
    "NumContainerCreateRequestsRejectedHardMinFreeSpace" : 0,
    "NumScans" : 1,
    "NumScansSkipped" : 0,
    "NumWriteRequestsInSoftBandMinFreeSpace" : 0,
    "NumWriteRequestsRejectedHardMinFreeSpace" : 0,
    "ReservedCrossesLimit" : 1,
    "Committed" : 0,
    "LayoutVersion" : 1,
    "Containers" : 0,
    "OzoneCapacity" : 105076655700,
    "OzoneAvailable" : 91655196672,
    "OzoneUsed" : 4382720,
    "Reserved" : 10508716,
    "FilesystemCapacity" : 105087164416,
    "FilesystemAvailable" : 91655196672,
    "FilesystemUsed" : 13431967744,
    "MinFreeSpace" : 104857600,
    "HardMinFreeSpace" : 104857600,
    "NonOzoneUsed" : 13427585024
  } ]
}bash-5.1$
  1. DN UI shows the new metric:
image

@priyeshkaratha priyeshkaratha left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks @anuragp010 for the patch and changes LGTM

@priyeshkaratha

Copy link
Copy Markdown
Contributor

@devmadhuu Can you review the changes?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants