Copilot commented on code in PR #6486:
URL: https://github.com/apache/hbase/pull/6486#discussion_r2840059611
##########
hbase-hadoop-compat/src/main/java/org/apache/hadoop/hbase/regionserver/MetricsRegionSourceImpl.java:
##########
@@ -215,6 +215,14 @@ void snapshot(MetricsRecordBuilder mrb, boolean ignored) {
this.regionWrapper.getMaxCompactedStoreFileRefCount());
mrb.addGauge(Interns.info(regionNamePrefix +
MetricsRegionServerSource.MEMSTORE_SIZE,
MetricsRegionServerSource.MEMSTORE_SIZE_DESC),
this.regionWrapper.getMemStoreSize());
+ mrb.addGauge(
+ Interns.info(regionNamePrefix +
MetricsRegionServerSource.MEMSTORE_HEAP_SIZE,
+ MetricsRegionServerSource.MEMSTORE_HEAP_SIZE_DESC),
+ this.regionWrapper.getMemStoreHeapSize());
+ mrb.addGauge(
+ Interns.info(regionNamePrefix +
MetricsRegionServerSource.MEMSTORE_OFFHEAP_SIZE,
+ MetricsRegionServerSource.MEMSTORE_OFFHEAP_SIZE_DESC),
+ this.regionWrapper.getMemStoreOffHeapSize());
Review Comment:
New region-level gauges for memstore heap/off-heap size are added here, but
the existing region metrics test only asserts memstoreSize. Please extend the
region metrics test (e.g.,
hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestMetricsRegion.java)
to assert memstoreHeapSize and memstoreOffHeapSize are exported with the
expected values, so this new behavior is covered and protected from regressions.
--
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]