Class TimelineV1DelegationTokenSecretManagerService.TimelineV1DelegationTokenSecretManager
java.lang.Object
org.apache.hadoop.security.token.SecretManager<TokenIdent>
org.apache.hadoop.security.token.delegation.AbstractDelegationTokenSecretManager<org.apache.hadoop.yarn.security.client.TimelineDelegationTokenIdentifier>
org.apache.hadoop.yarn.server.timeline.security.TimelineV1DelegationTokenSecretManagerService.TimelineV1DelegationTokenSecretManager
- Enclosing class:
- TimelineV1DelegationTokenSecretManagerService
@Private
@Unstable
public static class TimelineV1DelegationTokenSecretManagerService.TimelineV1DelegationTokenSecretManager
extends org.apache.hadoop.security.token.delegation.AbstractDelegationTokenSecretManager<org.apache.hadoop.yarn.security.client.TimelineDelegationTokenIdentifier>
Delegation token secret manager for ATSv1 and ATSv1.5.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.hadoop.security.token.delegation.AbstractDelegationTokenSecretManager
org.apache.hadoop.security.token.delegation.AbstractDelegationTokenSecretManager.DelegationTokenInformationNested classes/interfaces inherited from class org.apache.hadoop.security.token.SecretManager
org.apache.hadoop.security.token.SecretManager.InvalidToken -
Field Summary
FieldsFields inherited from class org.apache.hadoop.security.token.delegation.AbstractDelegationTokenSecretManager
allKeys, currentId, currentTokens, delegationTokenSequenceNumber, noInterruptsLock, running, storeTokenTrackingId, tokenOwnerStats -
Constructor Summary
ConstructorsConstructorDescriptionTimelineV1DelegationTokenSecretManager(long delegationKeyUpdateInterval, long delegationTokenMaxLifetime, long delegationTokenRenewInterval, long delegationTokenRemoverScanInterval, TimelineStateStore stateStore) Create a timeline v1 secret manager. -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.hadoop.yarn.security.client.TimelineDelegationTokenIdentifiervoidprotected voidremoveStoredMasterKey(org.apache.hadoop.security.token.delegation.DelegationKey key) protected voidremoveStoredToken(org.apache.hadoop.yarn.security.client.TimelineDelegationTokenIdentifier tokenId) protected voidstoreNewMasterKey(org.apache.hadoop.security.token.delegation.DelegationKey key) protected voidstoreNewToken(org.apache.hadoop.yarn.security.client.TimelineDelegationTokenIdentifier tokenId, long renewDate) protected voidupdateStoredToken(org.apache.hadoop.yarn.security.client.TimelineDelegationTokenIdentifier tokenId, long renewDate) Methods inherited from class org.apache.hadoop.security.token.delegation.AbstractDelegationTokenSecretManager
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, verifyTokenMethods inherited from class org.apache.hadoop.security.token.SecretManager
checkAvailableForRead, createPassword, generateSecret, retriableRetrievePassword, update, validateSecretKeyLength
-
Field Details
-
LOG
public static final org.slf4j.Logger LOG
-
-
Constructor Details
-
TimelineV1DelegationTokenSecretManager
public TimelineV1DelegationTokenSecretManager(long delegationKeyUpdateInterval, long delegationTokenMaxLifetime, long delegationTokenRenewInterval, long delegationTokenRemoverScanInterval, TimelineStateStore stateStore) Create a timeline v1 secret manager.- Parameters:
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 millisecondsstateStore- timeline service state store
-
-
Method Details
-
createIdentifier
public org.apache.hadoop.yarn.security.client.TimelineDelegationTokenIdentifier createIdentifier()- Specified by:
createIdentifierin classorg.apache.hadoop.security.token.SecretManager<org.apache.hadoop.yarn.security.client.TimelineDelegationTokenIdentifier>
-
storeNewMasterKey
protected void storeNewMasterKey(org.apache.hadoop.security.token.delegation.DelegationKey key) throws IOException - Overrides:
storeNewMasterKeyin classorg.apache.hadoop.security.token.delegation.AbstractDelegationTokenSecretManager<org.apache.hadoop.yarn.security.client.TimelineDelegationTokenIdentifier>- Throws:
IOException
-
removeStoredMasterKey
protected void removeStoredMasterKey(org.apache.hadoop.security.token.delegation.DelegationKey key) - Overrides:
removeStoredMasterKeyin classorg.apache.hadoop.security.token.delegation.AbstractDelegationTokenSecretManager<org.apache.hadoop.yarn.security.client.TimelineDelegationTokenIdentifier>
-
storeNewToken
protected void storeNewToken(org.apache.hadoop.yarn.security.client.TimelineDelegationTokenIdentifier tokenId, long renewDate) - Overrides:
storeNewTokenin classorg.apache.hadoop.security.token.delegation.AbstractDelegationTokenSecretManager<org.apache.hadoop.yarn.security.client.TimelineDelegationTokenIdentifier>
-
removeStoredToken
protected void removeStoredToken(org.apache.hadoop.yarn.security.client.TimelineDelegationTokenIdentifier tokenId) throws IOException - Overrides:
removeStoredTokenin classorg.apache.hadoop.security.token.delegation.AbstractDelegationTokenSecretManager<org.apache.hadoop.yarn.security.client.TimelineDelegationTokenIdentifier>- Throws:
IOException
-
updateStoredToken
protected void updateStoredToken(org.apache.hadoop.yarn.security.client.TimelineDelegationTokenIdentifier tokenId, long renewDate) - Overrides:
updateStoredTokenin classorg.apache.hadoop.security.token.delegation.AbstractDelegationTokenSecretManager<org.apache.hadoop.yarn.security.client.TimelineDelegationTokenIdentifier>
-
recover
- Throws:
IOException
-