@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, cancelToken, checkToken, createPassword, createSecretKey, decodeTokenIdentifier, getAllKeys, getCurrentKeyId, getDelegationKey, getDelegationTokenSeqNum, getTokenInfo, getTokenTrackingId, getTrackingIdIfEnabled, incrementCurrentKeyId, incrementDelegationTokenSeqNum, isRunning, logExpireToken, logExpireTokens, logUpdateMasterKey, renewToken, reset, retrievePassword, setCurrentKeyId, setDelegationTokenSeqNum, startThreads, stopThreads, storeDelegationKey, storeToken, updateDelegationKey, updateToken, verifyToken
public 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 public Set<org.apache.hadoop.security.token.delegation.DelegationKey> getAllMasterKeys()
@InterfaceAudience.Private public Map<org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier,Long> getAllTokens()
@InterfaceAudience.Private public int getLatestDTSequenceNumber()
public void recover(RMStateStore.RMState rmState) throws Exception
recover
in interface Recoverable
Exception
public long getRenewDate(org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier ident) throws org.apache.hadoop.security.token.SecretManager.InvalidToken
org.apache.hadoop.security.token.SecretManager.InvalidToken
Copyright © 2008–2021 Apache Software Foundation. All rights reserved.