HADOOP-15212. Add independent secret manager method for logging expired tokens. Contributed by Daryn Sharp.

This commit is contained in:
Kihwal Lee 2018-02-06 15:33:18 -06:00
parent bff858e910
commit 2dd960de98

View File

@ -22,6 +22,7 @@
import java.io.DataInputStream;
import java.io.IOException;
import java.security.MessageDigest;
import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
@ -627,6 +628,11 @@ private void removeExpiredToken() throws IOException {
}
}
// don't hold lock on 'this' to avoid edit log updates blocking token ops
logExpireTokens(expiredTokens);
}
protected void logExpireTokens(
Collection<TokenIdent> expiredTokens) throws IOException {
for (TokenIdent ident : expiredTokens) {
logExpireToken(ident);
LOG.info("Removing expired token " + formatTokenId(ident));