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

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

                Author: ASF GitHub Bot
            Created on: 04/Apr/22 17:49
            Start Date: 04/Apr/22 17:49
    Worklog Time Spent: 10m 
      Work Description: hchaverri commented on code in PR #4092:
URL: https://github.com/apache/hadoop/pull/4092#discussion_r841996722


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

Review Comment:
   I've move the call to track metrics in the body and the exception handler. 
If the code in the exception handler throws another exception we would still 
lose the original exception though.





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

    Worklog Id:     (was: 752410)
    Time Spent: 2h 10m  (was: 2h)

> 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.patch
>
>          Time Spent: 2h 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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to