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.DelegationTokenInformation

    Nested classes/interfaces inherited from class org.apache.hadoop.security.token.SecretManager

    org.apache.hadoop.security.token.SecretManager.InvalidToken
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final org.slf4j.Logger
     

    Fields inherited from class org.apache.hadoop.security.token.delegation.AbstractDelegationTokenSecretManager

    allKeys, currentId, currentTokens, delegationTokenSequenceNumber, noInterruptsLock, running, storeTokenTrackingId, tokenOwnerStats
  • Constructor Summary

    Constructors
    Constructor
    Description
    TimelineV1DelegationTokenSecretManager(long delegationKeyUpdateInterval, long delegationTokenMaxLifetime, long delegationTokenRenewInterval, long delegationTokenRemoverScanInterval, TimelineStateStore stateStore)
    Create a timeline v1 secret manager.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.apache.hadoop.yarn.security.client.TimelineDelegationTokenIdentifier
     
    void
     
    protected void
    removeStoredMasterKey(org.apache.hadoop.security.token.delegation.DelegationKey key)
     
    protected void
    removeStoredToken(org.apache.hadoop.yarn.security.client.TimelineDelegationTokenIdentifier tokenId)
     
    protected void
    storeNewMasterKey(org.apache.hadoop.security.token.delegation.DelegationKey key)
     
    protected void
    storeNewToken(org.apache.hadoop.yarn.security.client.TimelineDelegationTokenIdentifier tokenId, long renewDate)
     
    protected void
    updateStoredToken(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, verifyToken

    Methods inherited from class org.apache.hadoop.security.token.SecretManager

    checkAvailableForRead, createPassword, generateSecret, retriableRetrievePassword, update, validateSecretKeyLength

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 milliseconds
      delegationTokenRenewInterval - how often the tokens must be renewed in milliseconds
      delegationTokenRemoverScanInterval - how often the tokens are scanned for expired tokens in milliseconds
      stateStore - timeline service state store
  • Method Details

    • createIdentifier

      public org.apache.hadoop.yarn.security.client.TimelineDelegationTokenIdentifier createIdentifier()
      Specified by:
      createIdentifier in class org.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:
      storeNewMasterKey in class org.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:
      removeStoredMasterKey in class org.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:
      storeNewToken in class org.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:
      removeStoredToken in class org.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:
      updateStoredToken in class org.apache.hadoop.security.token.delegation.AbstractDelegationTokenSecretManager<org.apache.hadoop.yarn.security.client.TimelineDelegationTokenIdentifier>
    • recover

      public void recover(TimelineStateStore.TimelineServiceState state) throws IOException
      Throws:
      IOException