public class RouterDelegationTokenSecretManager
extends org.apache.hadoop.security.token.delegation.AbstractDelegationTokenSecretManager<org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier>
| Constructor | Description |
|---|---|
RouterDelegationTokenSecretManager(long delegationKeyUpdateInterval,
long delegationTokenMaxLifetime,
long delegationTokenRenewInterval,
long delegationTokenRemoverScanInterval,
org.apache.hadoop.conf.Configuration conf) |
Create a Router Secret manager.
|
| Modifier and Type | Method | Description |
|---|---|---|
org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier |
createIdentifier() |
|
java.util.Set<org.apache.hadoop.security.token.delegation.DelegationKey> |
getAllMasterKeys() |
|
java.util.Map<org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier,java.lang.Long> |
getAllTokens() |
|
protected int |
getCurrentKeyId() |
|
protected int |
getDelegationTokenSeqNum() |
|
int |
getLatestDTSequenceNumber() |
|
org.apache.hadoop.security.token.delegation.DelegationKey |
getMasterKeyByDelegationKey(org.apache.hadoop.security.token.delegation.DelegationKey key) |
The Router supports obtaining the DelegationKey stored in the Router StateStote
according to the DelegationKey.
|
long |
getRenewDate(org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier ident) |
|
org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier |
getTokenByRouterStoreToken(org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier identifier) |
Get RMDelegationTokenIdentifier according to RouterStoreToken.
|
protected org.apache.hadoop.security.token.delegation.AbstractDelegationTokenSecretManager.DelegationTokenInformation |
getTokenInfo(org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier ident) |
|
protected int |
incrementCurrentKeyId() |
|
protected int |
incrementDelegationTokenSeqNum() |
|
void |
removeStoredMasterKey(org.apache.hadoop.security.token.delegation.DelegationKey delegationKey) |
The Router Supports Remove the master key.
|
void |
removeStoredToken(org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier identifier) |
The Router Supports Remove Token.
|
protected void |
setDelegationTokenSeqNum(int seqNum) |
|
void |
setFederationFacade(org.apache.hadoop.yarn.server.federation.utils.FederationStateStoreFacade federationFacade) |
|
void |
storeNewMasterKey(org.apache.hadoop.security.token.delegation.DelegationKey newKey) |
The Router Supports Store the New Master Key.
|
void |
storeNewToken(org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier identifier,
long renewDate) |
The Router Supports Store new Token.
|
void |
storeNewToken(org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier identifier,
org.apache.hadoop.security.token.delegation.AbstractDelegationTokenSecretManager.DelegationTokenInformation tokenInfo) |
The Router Supports Store new Token.
|
protected void |
storeToken(org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier rmDelegationTokenIdentifier,
org.apache.hadoop.security.token.delegation.AbstractDelegationTokenSecretManager.DelegationTokenInformation tokenInfo) |
|
void |
updateStoredToken(org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier id,
long renewDate) |
The Router Supports Update Token.
|
void |
updateStoredToken(org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier identifier,
org.apache.hadoop.security.token.delegation.AbstractDelegationTokenSecretManager.DelegationTokenInformation tokenInfo) |
The Router Supports Update Token.
|
protected void |
updateToken(org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier rmDelegationTokenIdentifier,
org.apache.hadoop.security.token.delegation.AbstractDelegationTokenSecretManager.DelegationTokenInformation tokenInfo) |
addKey, addPersistedDelegationToken, addTokenForOwnerStats, cancelToken, checkToken, createPassword, createSecretKey, decodeTokenIdentifier, getAllKeys, getCandidateTokensForCleanup, getCurrentTokensSize, getDelegationKey, getMetrics, getTokenRenewInterval, getTokenTrackingId, getTopTokenRealOwners, getTrackingIdIfEnabled, isRunning, logExpireToken, logExpireTokens, logUpdateMasterKey, removeExpiredStoredToken, renewToken, reset, retrievePassword, rollMasterKey, setCurrentKeyId, startThreads, stopThreads, storeDelegationKey, syncTokenOwnerStats, updateDelegationKey, verifyTokenpublic RouterDelegationTokenSecretManager(long delegationKeyUpdateInterval,
long delegationTokenMaxLifetime,
long delegationTokenRenewInterval,
long delegationTokenRemoverScanInterval,
org.apache.hadoop.conf.Configuration conf)
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 scannedconf - Configuration.public org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier createIdentifier()
createIdentifier in class org.apache.hadoop.security.token.SecretManager<org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier>public 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>newKey - DelegationKeypublic void removeStoredMasterKey(org.apache.hadoop.security.token.delegation.DelegationKey delegationKey)
removeStoredMasterKey in class org.apache.hadoop.security.token.delegation.AbstractDelegationTokenSecretManager<org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier>delegationKey - DelegationKeypublic void storeNewToken(org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier identifier,
long renewDate)
throws java.io.IOException
storeNewToken in class org.apache.hadoop.security.token.delegation.AbstractDelegationTokenSecretManager<org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier>identifier - RMDelegationTokenrenewDate - renewDatejava.io.IOException - IO exception occurred.public void storeNewToken(org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier identifier,
org.apache.hadoop.security.token.delegation.AbstractDelegationTokenSecretManager.DelegationTokenInformation tokenInfo)
identifier - RMDelegationToken.tokenInfo - DelegationTokenInformation.public void updateStoredToken(org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier id,
long renewDate)
throws java.io.IOException
updateStoredToken in class org.apache.hadoop.security.token.delegation.AbstractDelegationTokenSecretManager<org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier>id - RMDelegationTokenrenewDate - renewDatejava.io.IOException - IO exception occurredpublic void updateStoredToken(org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier identifier,
org.apache.hadoop.security.token.delegation.AbstractDelegationTokenSecretManager.DelegationTokenInformation tokenInfo)
identifier - RMDelegationToken.tokenInfo - DelegationTokenInformation.public void removeStoredToken(org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier identifier)
throws java.io.IOException
removeStoredToken in class org.apache.hadoop.security.token.delegation.AbstractDelegationTokenSecretManager<org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier>identifier - Delegation Tokenjava.io.IOException - IO exception occurred.public org.apache.hadoop.security.token.delegation.DelegationKey getMasterKeyByDelegationKey(org.apache.hadoop.security.token.delegation.DelegationKey key)
throws org.apache.hadoop.yarn.exceptions.YarnException,
java.io.IOException
key - Param DelegationKeyorg.apache.hadoop.yarn.exceptions.YarnException - An internal conversion error occurred when getting the Tokenjava.io.IOException - IO exception occurredpublic org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier getTokenByRouterStoreToken(org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier identifier)
throws org.apache.hadoop.yarn.exceptions.YarnException,
java.io.IOException
identifier - RMDelegationTokenIdentifierorg.apache.hadoop.yarn.exceptions.YarnException - An internal conversion error occurred when getting the Tokenjava.io.IOException - IO exception occurredpublic void setFederationFacade(org.apache.hadoop.yarn.server.federation.utils.FederationStateStoreFacade federationFacade)
@Public @VisibleForTesting public int getLatestDTSequenceNumber()
@Public @VisibleForTesting public java.util.Set<org.apache.hadoop.security.token.delegation.DelegationKey> getAllMasterKeys()
@Public @VisibleForTesting public java.util.Map<org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier,java.lang.Long> getAllTokens()
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.InvalidTokenprotected int incrementDelegationTokenSeqNum()
incrementDelegationTokenSeqNum in class org.apache.hadoop.security.token.delegation.AbstractDelegationTokenSecretManager<org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier>protected void storeToken(org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier rmDelegationTokenIdentifier,
org.apache.hadoop.security.token.delegation.AbstractDelegationTokenSecretManager.DelegationTokenInformation tokenInfo)
throws java.io.IOException
storeToken in class org.apache.hadoop.security.token.delegation.AbstractDelegationTokenSecretManager<org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier>java.io.IOExceptionprotected void updateToken(org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier rmDelegationTokenIdentifier,
org.apache.hadoop.security.token.delegation.AbstractDelegationTokenSecretManager.DelegationTokenInformation tokenInfo)
throws java.io.IOException
updateToken in class org.apache.hadoop.security.token.delegation.AbstractDelegationTokenSecretManager<org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier>java.io.IOExceptionprotected org.apache.hadoop.security.token.delegation.AbstractDelegationTokenSecretManager.DelegationTokenInformation getTokenInfo(org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier ident)
getTokenInfo in class org.apache.hadoop.security.token.delegation.AbstractDelegationTokenSecretManager<org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier>protected int getDelegationTokenSeqNum()
getDelegationTokenSeqNum in class org.apache.hadoop.security.token.delegation.AbstractDelegationTokenSecretManager<org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier>protected void setDelegationTokenSeqNum(int seqNum)
setDelegationTokenSeqNum in class org.apache.hadoop.security.token.delegation.AbstractDelegationTokenSecretManager<org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier>protected int getCurrentKeyId()
getCurrentKeyId in class org.apache.hadoop.security.token.delegation.AbstractDelegationTokenSecretManager<org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier>protected int incrementCurrentKeyId()
incrementCurrentKeyId in class org.apache.hadoop.security.token.delegation.AbstractDelegationTokenSecretManager<org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier>Copyright © 2008–2025 Apache Software Foundation. All rights reserved.