[ 
https://issues.apache.org/jira/browse/HADOOP-18167?focusedWorklogId=747451&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-747451
 ]

ASF GitHub Bot logged work on HADOOP-18167:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 24/Mar/22 21:00
            Start Date: 24/Mar/22 21:00
    Worklog Time Spent: 10m 
      Work Description: omalley commented on a change in pull request #4092:
URL: https://github.com/apache/hadoop/pull/4092#discussion_r834722208



##########
File path: 
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/token/delegation/AbstractDelegationTokenSecretManager.java
##########
@@ -429,11 +445,16 @@ private synchronized void removeExpiredKeys() {
     byte[] password = createPassword(identifier.getBytes(), 
currentKey.getKey());
     DelegationTokenInformation tokenInfo = new DelegationTokenInformation(now
         + tokenRenewInterval, password, getTrackingIdIfEnabled(identifier));
+    long start = Time.monotonicNow();
     try {
       storeToken(identifier, tokenInfo);
     } catch (IOException ioe) {
       LOG.error("Could not store token " + formatTokenId(identifier) + "!!",
           ioe);
+    } finally {
+      if (metrics != null) {
+        metrics.addStoreToken(Time.monotonicNow() - start);
+      }

Review comment:
       I'd be happier if the addStoreToken was only updated when it was 
successful. We should track failures separately with a counter. (I don't think 
we need to track the operation that had the exception, just track the count of 
exceptions that happened getting delegation tokens.




-- 
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: common-issues-unsubscr...@hadoop.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 747451)
    Time Spent: 1h 10m  (was: 1h)

> 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.patch
>
>          Time Spent: 1h 10m
>  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.1#820001)

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org

Reply via email to