HADOOP-15212. Add independent secret manager method for logging expired tokens. Contributed by Daryn Sharp.
This commit is contained in:
parent
bff858e910
commit
2dd960de98
|
@ -22,6 +22,7 @@ import java.io.ByteArrayInputStream;
|
|||
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 @@ extends AbstractDelegationTokenIdentifier>
|
|||
}
|
||||
}
|
||||
// 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));
|
||||
|
|
Loading…
Reference in New Issue