hchaverri commented on a change in pull request #4092: URL: https://github.com/apache/hadoop/pull/4092#discussion_r835596557
########## 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've made changes to only increment the storeToken, updateToken and removeToken metrics when the operation was successful. I also added a new counter "tokenFailure" that is updated when the operation is not successful. -- 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 --------------------------------------------------------------------- To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-issues-h...@hadoop.apache.org