svn merge -c 1618659 FIXES: 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/branches/branch-2@1618661 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
0b20086da1
commit
03a33d0f91
|
@ -160,6 +160,10 @@ Release 2.6.0 - UNRELEASED
|
||||||
HADOOP-10964. Small fix for NetworkTopologyWithNodeGroup#sortByDistance.
|
HADOOP-10964. Small fix for NetworkTopologyWithNodeGroup#sortByDistance.
|
||||||
(Yi Liu via wang)
|
(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
|
Release 2.5.0 - UNRELEASED
|
||||||
|
|
||||||
INCOMPATIBLE CHANGES
|
INCOMPATIBLE CHANGES
|
||||||
|
|
|
@ -88,13 +88,13 @@ public class RpcMetrics {
|
||||||
@Metric("Processsing time") MutableRate rpcProcessingTime;
|
@Metric("Processsing time") MutableRate rpcProcessingTime;
|
||||||
MutableQuantiles[] rpcProcessingTimeMillisQuantiles;
|
MutableQuantiles[] rpcProcessingTimeMillisQuantiles;
|
||||||
@Metric("Number of authentication failures")
|
@Metric("Number of authentication failures")
|
||||||
MutableCounterInt rpcAuthenticationFailures;
|
MutableCounterLong rpcAuthenticationFailures;
|
||||||
@Metric("Number of authentication successes")
|
@Metric("Number of authentication successes")
|
||||||
MutableCounterInt rpcAuthenticationSuccesses;
|
MutableCounterLong rpcAuthenticationSuccesses;
|
||||||
@Metric("Number of authorization failures")
|
@Metric("Number of authorization failures")
|
||||||
MutableCounterInt rpcAuthorizationFailures;
|
MutableCounterLong rpcAuthorizationFailures;
|
||||||
@Metric("Number of authorization sucesses")
|
@Metric("Number of authorization sucesses")
|
||||||
MutableCounterInt rpcAuthorizationSuccesses;
|
MutableCounterLong rpcAuthorizationSuccesses;
|
||||||
|
|
||||||
@Metric("Number of open connections") public int numOpenConnections() {
|
@Metric("Number of open connections") public int numOpenConnections() {
|
||||||
return server.getNumOpenConnections();
|
return server.getNumOpenConnections();
|
||||||
|
|
|
@ -583,14 +583,14 @@ public class TestRPC {
|
||||||
}
|
}
|
||||||
MetricsRecordBuilder rb = getMetrics(server.rpcMetrics.name());
|
MetricsRecordBuilder rb = getMetrics(server.rpcMetrics.name());
|
||||||
if (expectFailure) {
|
if (expectFailure) {
|
||||||
assertCounter("RpcAuthorizationFailures", 1, rb);
|
assertCounter("RpcAuthorizationFailures", 1L, rb);
|
||||||
} else {
|
} else {
|
||||||
assertCounter("RpcAuthorizationSuccesses", 1, rb);
|
assertCounter("RpcAuthorizationSuccesses", 1L, rb);
|
||||||
}
|
}
|
||||||
//since we don't have authentication turned ON, we should see
|
//since we don't have authentication turned ON, we should see
|
||||||
// 0 for the authentication successes and 0 for failure
|
// 0 for the authentication successes and 0 for failure
|
||||||
assertCounter("RpcAuthenticationFailures", 0, rb);
|
assertCounter("RpcAuthenticationFailures", 0L, rb);
|
||||||
assertCounter("RpcAuthenticationSuccesses", 0, rb);
|
assertCounter("RpcAuthenticationSuccesses", 0L, rb);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue