[
https://issues.apache.org/jira/browse/HADOOP-18167?focusedWorklogId=760956&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-760956
]
ASF GitHub Bot logged work on HADOOP-18167:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 22/Apr/22 17:15
Start Date: 22/Apr/22 17:15
Worklog Time Spent: 10m
Work Description: hchaverri commented on code in PR #4092:
URL: https://github.com/apache/hadoop/pull/4092#discussion_r856425759
##########
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/token/delegation/AbstractDelegationTokenSecretManager.java:
##########
@@ -825,4 +858,68 @@ 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 {
+ private static final Logger LOG =
LoggerFactory.getLogger(DelegationTokenSecretManagerMetrics.class);
+
+ final static String STORE_TOKEN_STAT = "storeToken";
+ final static String UPDATE_TOKEN_STAT = "updateToken";
+ final static String REMOVE_TOKEN_STAT = "removeToken";
+ final static String TOKEN_FAILURE_STAT = "tokenFailure";
+
+ final MetricsRegistry registry;
+ final IOStatisticsStore ioStatistics;
+
+ @Metric("Rate of storage of delegation tokens and latency (milliseconds)")
+ MutableRate storeToken;
Review Comment:
I've made this private and added accessor methods
##########
hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/security/token/delegation/TestDelegationToken.java:
##########
@@ -155,6 +159,42 @@ public DelegationKey getKey(TestDelegationTokenIdentifier
id) {
return allKeys.get(id.getMasterKeyId());
}
}
+
+ public static class TestFailureDelegationTokenSecretManager extends
TestDelegationTokenSecretManager {
Review Comment:
Fixed
Issue Time Tracking
-------------------
Worklog Id: (was: 760956)
Time Spent: 5h 20m (was: 5h 10m)
> Add metrics to track delegation token secret manager operations
> ---------------------------------------------------------------
>
> Key: HADOOP-18167
> URL: https://issues.apache.org/jira/browse/HADOOP-18167
> Project: Hadoop Common
> Issue Type: Improvement
> Reporter: Hector Sandoval Chaverri
> Priority: Major
> Labels: pull-request-available
> Attachments: HADOOP-18167-branch-2.10-2.patch,
> HADOOP-18167-branch-2.10-3.patch, HADOOP-18167-branch-2.10.patch
>
> Time Spent: 5h 20m
> Remaining Estimate: 0h
>
> New metrics to track operations that store, update and remove delegation
> tokens in implementations of AbstractDelegationTokenSecretManager. This will
> help evaluate the impact of using different secret managers and add
> optimizations.
--
This message was sent by Atlassian Jira
(v8.20.7#820007)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]