@InterfaceAudience.Private @InterfaceStability.Unstable public class RMDelegationTokenSecretManager extends org.apache.hadoop.security.token.delegation.AbstractDelegationTokenSecretManager<org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier> implements Recoverable
| Constructor and Description |
|---|
RMDelegationTokenSecretManager(long delegationKeyUpdateInterval,
long delegationTokenMaxLifetime,
long delegationTokenRenewInterval,
long delegationTokenRemoverScanInterval,
RMContext rmContext)
Create a secret manager
|
| Modifier and Type | Method and Description |
|---|---|
org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier |
createIdentifier() |
Set<org.apache.hadoop.security.token.delegation.DelegationKey> |
getAllMasterKeys() |
Map<org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier,Long> |
getAllTokens() |
int |
getLatestDTSequenceNumber() |
long |
getRenewDate(org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier ident) |
void |
recover(RMStateStore.RMState rmState) |
protected void |
removeStoredMasterKey(org.apache.hadoop.security.token.delegation.DelegationKey key) |
protected void |
removeStoredToken(org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier ident) |
protected void |
storeNewMasterKey(org.apache.hadoop.security.token.delegation.DelegationKey newKey) |
protected void |
storeNewToken(org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier identifier,
long renewDate) |
protected void |
updateStoredToken(org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier id,
long renewDate) |
addKey, addPersistedDelegationToken, addTokenForOwnerStats, cancelToken, checkToken, createPassword, createSecretKey, decodeTokenIdentifier, getAllKeys, getCandidateTokensForCleanup, getCurrentKeyId, getCurrentTokensSize, getDelegationKey, getDelegationTokenSeqNum, getMetrics, getTokenInfo, getTokenRenewInterval, getTokenTrackingId, getTopTokenRealOwners, getTrackingIdIfEnabled, incrementCurrentKeyId, incrementDelegationTokenSeqNum, isRunning, logExpireToken, logExpireTokens, logUpdateMasterKey, removeExpiredStoredToken, renewToken, reset, retrievePassword, rollMasterKey, setCurrentKeyId, setDelegationTokenSeqNum, startThreads, stopThreads, storeDelegationKey, storeToken, syncTokenOwnerStats, updateDelegationKey, updateToken, verifyTokenpublic RMDelegationTokenSecretManager(long delegationKeyUpdateInterval,
long delegationTokenMaxLifetime,
long delegationTokenRenewInterval,
long delegationTokenRemoverScanInterval,
RMContext rmContext)
delegationKeyUpdateInterval - the number of milliseconds for rolling
new secret keys.delegationTokenMaxLifetime - the maximum lifetime of the delegation
tokens in millisecondsdelegationTokenRenewInterval - how often the tokens must be renewed
in millisecondsdelegationTokenRemoverScanInterval - how often the tokens are scanned
for expired tokens in millisecondsrmContext - current context of the ResourceManagerpublic org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier createIdentifier()
createIdentifier in class org.apache.hadoop.security.token.SecretManager<org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier>protected void storeNewMasterKey(org.apache.hadoop.security.token.delegation.DelegationKey newKey)
storeNewMasterKey in class org.apache.hadoop.security.token.delegation.AbstractDelegationTokenSecretManager<org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier>protected void removeStoredMasterKey(org.apache.hadoop.security.token.delegation.DelegationKey key)
removeStoredMasterKey in class org.apache.hadoop.security.token.delegation.AbstractDelegationTokenSecretManager<org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier>protected void storeNewToken(org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier identifier,
long renewDate)
storeNewToken in class org.apache.hadoop.security.token.delegation.AbstractDelegationTokenSecretManager<org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier>protected void updateStoredToken(org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier id,
long renewDate)
updateStoredToken in class org.apache.hadoop.security.token.delegation.AbstractDelegationTokenSecretManager<org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier>protected void removeStoredToken(org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier ident)
throws IOException
removeStoredToken in class org.apache.hadoop.security.token.delegation.AbstractDelegationTokenSecretManager<org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier>IOException@InterfaceAudience.Private @VisibleForTesting public Set<org.apache.hadoop.security.token.delegation.DelegationKey> getAllMasterKeys()
@InterfaceAudience.Private @VisibleForTesting public Map<org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier,Long> getAllTokens()
@InterfaceAudience.Private @VisibleForTesting public int getLatestDTSequenceNumber()
public void recover(RMStateStore.RMState rmState) throws Exception
recover in interface RecoverableExceptionpublic long getRenewDate(org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier ident)
throws org.apache.hadoop.security.token.SecretManager.InvalidToken
org.apache.hadoop.security.token.SecretManager.InvalidTokenCopyright © 2008–2024 Apache Software Foundation. All rights reserved.