HADOOP-10059. RPC authentication and authorization metrics overflow to negative values on busy clusters. Contributed by Tsuyoshi OZAWA and Akira AJISAKA
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1618659 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
08d6201b34
commit
4a978bff3e
|
@ -605,6 +605,10 @@ Release 2.6.0 - UNRELEASED
|
|||
HADOOP-10964. Small fix for NetworkTopologyWithNodeGroup#sortByDistance.
|
||||
(Yi Liu via wang)
|
||||
|
||||
HADOOP-10059. RPC authentication and authorization metrics overflow to
|
||||
negative values on busy clusters (Tsuyoshi OZAWA and Akira AJISAKA
|
||||
via jlowe)
|
||||
|
||||
Release 2.5.0 - UNRELEASED
|
||||
|
||||
INCOMPATIBLE CHANGES
|
||||
|
|
|
@ -88,13 +88,13 @@ public class RpcMetrics {
|
|||
@Metric("Processsing time") MutableRate rpcProcessingTime;
|
||||
MutableQuantiles[] rpcProcessingTimeMillisQuantiles;
|
||||
@Metric("Number of authentication failures")
|
||||
MutableCounterInt rpcAuthenticationFailures;
|
||||
MutableCounterLong rpcAuthenticationFailures;
|
||||
@Metric("Number of authentication successes")
|
||||
MutableCounterInt rpcAuthenticationSuccesses;
|
||||
MutableCounterLong rpcAuthenticationSuccesses;
|
||||
@Metric("Number of authorization failures")
|
||||
MutableCounterInt rpcAuthorizationFailures;
|
||||
MutableCounterLong rpcAuthorizationFailures;
|
||||
@Metric("Number of authorization sucesses")
|
||||
MutableCounterInt rpcAuthorizationSuccesses;
|
||||
MutableCounterLong rpcAuthorizationSuccesses;
|
||||
|
||||
@Metric("Number of open connections") public int numOpenConnections() {
|
||||
return server.getNumOpenConnections();
|
||||
|
|
|
@ -583,14 +583,14 @@ public class TestRPC {
|
|||
}
|
||||
MetricsRecordBuilder rb = getMetrics(server.rpcMetrics.name());
|
||||
if (expectFailure) {
|
||||
assertCounter("RpcAuthorizationFailures", 1, rb);
|
||||
assertCounter("RpcAuthorizationFailures", 1L, rb);
|
||||
} else {
|
||||
assertCounter("RpcAuthorizationSuccesses", 1, rb);
|
||||
assertCounter("RpcAuthorizationSuccesses", 1L, rb);
|
||||
}
|
||||
//since we don't have authentication turned ON, we should see
|
||||
// 0 for the authentication successes and 0 for failure
|
||||
assertCounter("RpcAuthenticationFailures", 0, rb);
|
||||
assertCounter("RpcAuthenticationSuccesses", 0, rb);
|
||||
assertCounter("RpcAuthenticationFailures", 0L, rb);
|
||||
assertCounter("RpcAuthenticationSuccesses", 0L, rb);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue