You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "slfan1989 (via GitHub)" <gi...@apache.org> on 2023/08/01 05:05:35 UTC
[GitHub] [hadoop] slfan1989 commented on a diff in pull request #5897: HDFS-17128. Updating SQLDelegationTokenSecretManager to use LoadingCache so tokens are updated frequently.
slfan1989 commented on code in PR #5897:
URL: https://github.com/apache/hadoop/pull/5897#discussion_r1280112864
##########
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/token/delegation/SQLDelegationTokenSecretManager.java:
##########
@@ -153,36 +161,60 @@ protected void removeStoredToken(TokenIdent ident) throws IOException {
}
}
+ @Override
+ protected void removeExpiredStoredToken(TokenIdent ident) {
+ try {
+ // Ensure that the token has not been renewed in SQL by
+ // another secret manager
+ DelegationTokenInformation tokenInfo = getTokenInfoFromSQL(ident);
+ if (tokenInfo.getRenewDate() >= Time.now()) {
+ LOG.info("Token was renewed by a different router and has not been deleted: " + ident);
Review Comment:
LOG.info("Token was renewed by a different router and has not been deleted: {}", ident);
--
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-unsubscribe@hadoop.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org