simbadzina commented on a change in pull request #4092:
URL: https://github.com/apache/hadoop/pull/4092#discussion_r834774762
##########
File path:
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/token/delegation/AbstractDelegationTokenSecretManager.java
##########
@@ -825,4 +860,55 @@ protected void syncTokenOwnerStats() {
addTokenForOwnerStats(id);
}
}
+
+ /**
+ * DelegationTokenSecretManagerMetrics tracks token management operations
+ * and publishes them through the metrics interfaces.
+ */
+ @Metrics(about="Delegation token secret manager metrics", context="token")
+ static class DelegationTokenSecretManagerMetrics implements
IOStatisticsSource {
+ final static String STORE_TOKEN_STAT = "storeToken";
+ final static String UPDATE_TOKEN_STAT = "updateToken";
+ final static String REMOVE_TOKEN_STAT = "removeToken";
+
+ final MetricsRegistry registry = new
MetricsRegistry("DelegationTokenSecretManagerMetrics");
Review comment:
I see. A minor change would be to add "LOG.debug("Initialized {}",
registry);" like in ClientSCMMetrics just so the IDE and potential our style
check steps in testing don't fail.
The creation of the registry can also be part of the constructor.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]