[
https://issues.apache.org/jira/browse/HBASE-30132?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
ASF GitHub Bot updated HBASE-30132:
-----------------------------------
Labels: pull-request-available (was: )
> Expose per column family storeFileSize JMX metric
> -------------------------------------------------
>
> Key: HBASE-30132
> URL: https://issues.apache.org/jira/browse/HBASE-30132
> Project: HBase
> Issue Type: Task
> Components: metrics
> Reporter: JinHyuk Kim
> Assignee: JinHyuk Kim
> Priority: Minor
> Labels: pull-request-available
>
> h2. Summary
> {{storeFileSize}} is exposed at table, region, and regionserver level, but
> not per column family. We sums all stores per table, so on multi-CF tables
> the per-family disk footprint is invisible.
> h2. Motivation
> In day-to-day operation we sometimes need per-family size to answer questions
> the table-level metric can't:
> - Which CF in this multi-CF table is actually growing?
> - Is one CF dominating disk usage while others stay small?
> Today the only way to get this is by walking HDFS or scraping the
> {{table.jsp}} UI, neither of which is suitable for monitoring/alerting
> pipelines.
> h2. Proposal
> Add a per-CF gauge reusing the naming pattern HBASE-24205 introduced for read
> counts:
> {code:java}
> Namespace_${ns}_table_${table}_columnfamily_${family}_metric_storeFileSize
> {code}
> The existing per-table {{storeFileSize}} gauge is preserved.
> h2. Testing
> Manual verification against a standalone HBase:
> Create a test table with two column families and put some data:
> {code:java}
> create 'test', 'f1', 'f2'
> put 'test', 'r1', 'f1:a', 'v1'
> put 'test', 'r1', 'f2:a', 'value_with_long_value'
> flush 'test'
> {code}
> Query the regionserver JMX endpoint and confirm both per-CF gauges appear:
> {code:java}
> curl -s http://localhost:16030/jmx | grep -E
> 'columnfamily_(f1|f2)_metric_storeFileSize'
> {code}
> Result:
> {code:java}
> "Namespace_default_table_test_columnfamily_f1_metric_storeFileSize": 4956,
> "Namespace_default_table_test_columnfamily_f2_metric_storeFileSize": 4975,
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)