HBASE-25434 SlowDelete & SlowPut metric value should use updateDelete & updatePut (#2837)
Signed-off-by: Zheng Wang <wangzheng@apache.org>
(cherry picked from commit 7d70141b90
)
This commit is contained in:
parent
e39bae4ddb
commit
99f2b71cc9
|
@ -113,9 +113,6 @@ public class MetricsRegionServer {
|
|||
if (tableMetrics != null && tn != null) {
|
||||
tableMetrics.updatePutBatch(tn, t);
|
||||
}
|
||||
if (t > slowMetricTime) {
|
||||
serverSource.incrSlowPut();
|
||||
}
|
||||
serverSource.updatePutBatch(t);
|
||||
}
|
||||
|
||||
|
@ -123,6 +120,9 @@ public class MetricsRegionServer {
|
|||
if (tableMetrics != null && tn != null) {
|
||||
tableMetrics.updatePut(tn, t);
|
||||
}
|
||||
if (t > slowMetricTime) {
|
||||
serverSource.incrSlowPut();
|
||||
}
|
||||
serverSource.updatePut(t);
|
||||
userAggregate.updatePut(t);
|
||||
}
|
||||
|
@ -131,6 +131,9 @@ public class MetricsRegionServer {
|
|||
if (tableMetrics != null && tn != null) {
|
||||
tableMetrics.updateDelete(tn, t);
|
||||
}
|
||||
if (t > slowMetricTime) {
|
||||
serverSource.incrSlowDelete();
|
||||
}
|
||||
serverSource.updateDelete(t);
|
||||
userAggregate.updateDelete(t);
|
||||
}
|
||||
|
@ -139,9 +142,6 @@ public class MetricsRegionServer {
|
|||
if (tableMetrics != null && tn != null) {
|
||||
tableMetrics.updateDeleteBatch(tn, t);
|
||||
}
|
||||
if (t > slowMetricTime) {
|
||||
serverSource.incrSlowDelete();
|
||||
}
|
||||
serverSource.updateDeleteBatch(t);
|
||||
}
|
||||
|
||||
|
|
|
@ -149,6 +149,8 @@ public class TestMetricsRegionServer {
|
|||
for (int i=0; i < 17; i ++) {
|
||||
rsm.updatePut(null, 17);
|
||||
rsm.updateDelete(null, 17);
|
||||
rsm.updatePut(null, 1006);
|
||||
rsm.updateDelete(null, 1003);
|
||||
rsm.updateCheckAndDelete(null, 17);
|
||||
rsm.updateCheckAndPut(null, 17);
|
||||
rsm.updateCheckAndMutate(null, 17);
|
||||
|
@ -159,17 +161,17 @@ public class TestMetricsRegionServer {
|
|||
HELPER.assertCounter("getNumOps", 28, serverSource);
|
||||
HELPER.assertCounter("incrementNumOps", 30, serverSource);
|
||||
HELPER.assertCounter("putBatchNumOps", 32, serverSource);
|
||||
HELPER.assertCounter("putNumOps", 17, serverSource);
|
||||
HELPER.assertCounter("deleteNumOps", 17, serverSource);
|
||||
HELPER.assertCounter("putNumOps", 34, serverSource);
|
||||
HELPER.assertCounter("deleteNumOps", 34, serverSource);
|
||||
HELPER.assertCounter("checkAndDeleteNumOps", 17, serverSource);
|
||||
HELPER.assertCounter("checkAndPutNumOps", 17, serverSource);
|
||||
HELPER.assertCounter("checkAndMutateNumOps", 17, serverSource);
|
||||
|
||||
HELPER.assertCounter("slowAppendCount", 12, serverSource);
|
||||
HELPER.assertCounter("slowDeleteCount", 13, serverSource);
|
||||
HELPER.assertCounter("slowDeleteCount", 17, serverSource);
|
||||
HELPER.assertCounter("slowGetCount", 14, serverSource);
|
||||
HELPER.assertCounter("slowIncrementCount", 15, serverSource);
|
||||
HELPER.assertCounter("slowPutCount", 16, serverSource);
|
||||
HELPER.assertCounter("slowPutCount", 17, serverSource);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
Loading…
Reference in New Issue