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.
--
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]