HDFS-16998. RBF: Add ops metrics for getSlowDatanodeReport in RouterClientActivity (#5615)
This commit is contained in:
parent
27776ac45e
commit
ceb8878d4f
@ -147,6 +147,7 @@ public class RouterClientMetrics {
|
|||||||
@Metric private MutableCounterLong satisfyStoragePolicyOps;
|
@Metric private MutableCounterLong satisfyStoragePolicyOps;
|
||||||
@Metric private MutableCounterLong getHAServiceStateOps;
|
@Metric private MutableCounterLong getHAServiceStateOps;
|
||||||
@Metric private MutableCounterLong otherOps;
|
@Metric private MutableCounterLong otherOps;
|
||||||
|
@Metric private MutableCounterLong getSlowDatanodeReportOps;
|
||||||
|
|
||||||
// private ConcurrentOps
|
// private ConcurrentOps
|
||||||
@Metric private MutableCounterLong concurrentSetReplicationOps;
|
@Metric private MutableCounterLong concurrentSetReplicationOps;
|
||||||
@ -184,6 +185,7 @@ public class RouterClientMetrics {
|
|||||||
@Metric private MutableCounterLong concurrentSetQuotaOps;
|
@Metric private MutableCounterLong concurrentSetQuotaOps;
|
||||||
@Metric private MutableCounterLong concurrentGetQuotaUsageOps;
|
@Metric private MutableCounterLong concurrentGetQuotaUsageOps;
|
||||||
@Metric private MutableCounterLong concurrentOtherOps;
|
@Metric private MutableCounterLong concurrentOtherOps;
|
||||||
|
@Metric private MutableCounterLong concurrentGetSlowDatanodeReportOps;
|
||||||
|
|
||||||
RouterClientMetrics(String processName, String sessionId) {
|
RouterClientMetrics(String processName, String sessionId) {
|
||||||
registry.tag(ProcessName, processName).tag(SessionId, sessionId);
|
registry.tag(ProcessName, processName).tag(SessionId, sessionId);
|
||||||
@ -525,6 +527,9 @@ public void incInvokedMethod(Method method) {
|
|||||||
case "getHAServiceState":
|
case "getHAServiceState":
|
||||||
getHAServiceStateOps.incr();
|
getHAServiceStateOps.incr();
|
||||||
break;
|
break;
|
||||||
|
case "getSlowDatanodeReport":
|
||||||
|
getSlowDatanodeReportOps.incr();
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
otherOps.incr();
|
otherOps.incr();
|
||||||
}
|
}
|
||||||
@ -638,6 +643,9 @@ public void incInvokedConcurrent(Method method){
|
|||||||
case "getQuotaUsage":
|
case "getQuotaUsage":
|
||||||
concurrentGetQuotaUsageOps.incr();
|
concurrentGetQuotaUsageOps.incr();
|
||||||
break;
|
break;
|
||||||
|
case "getSlowDatanodeReport":
|
||||||
|
concurrentGetSlowDatanodeReportOps.incr();
|
||||||
|
break;
|
||||||
default :
|
default :
|
||||||
concurrentOtherOps.incr();
|
concurrentOtherOps.incr();
|
||||||
}
|
}
|
||||||
|
@ -170,5 +170,12 @@ public void testGetDatanodeReport() throws Exception {
|
|||||||
getMetrics(ROUTER_METRICS));
|
getMetrics(ROUTER_METRICS));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testGetSlowDatanodeReport() throws Exception {
|
||||||
|
router.getRpcServer().getSlowDatanodeReport();
|
||||||
|
assertCounter("GetSlowDatanodeReportOps", 2L, getMetrics(ROUTER_METRICS));
|
||||||
|
assertCounter("ConcurrentGetSlowDatanodeReportOps", 1L, getMetrics(ROUTER_METRICS));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user