Class TimelineStateStore

java.lang.Object
org.apache.hadoop.service.AbstractService
org.apache.hadoop.yarn.server.timeline.recovery.TimelineStateStore
All Implemented Interfaces:
Closeable, AutoCloseable, org.apache.hadoop.service.Service
Direct Known Subclasses:
LeveldbTimelineStateStore, MemoryTimelineStateStore

@Private @Unstable public abstract class TimelineStateStore extends org.apache.hadoop.service.AbstractService
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
     

    Nested classes/interfaces inherited from interface org.apache.hadoop.service.Service

    org.apache.hadoop.service.Service.STATE
  • Constructor Summary

    Constructors
    Constructor
    Description
     
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected abstract void
    Implementation-specific shutdown.
    protected abstract void
    initStorage(org.apache.hadoop.conf.Configuration conf)
    Implementation-specific initialization.
    Load the timeline service state from the state storage.
    abstract void
    removeToken(org.apache.hadoop.yarn.security.client.TimelineDelegationTokenIdentifier tokenId)
    Blocking method to remove a delegation token from the state storage.
    abstract void
    removeTokenMasterKey(org.apache.hadoop.security.token.delegation.DelegationKey key)
    Blocking method to remove a delegation token master key.
    void
    serviceInit(org.apache.hadoop.conf.Configuration conf)
    Initialize the state storage
    void
    Start the state storage for use
    void
    Shutdown the state storage.
    protected abstract void
    Implementation-specific startup.
    abstract void
    storeToken(org.apache.hadoop.yarn.security.client.TimelineDelegationTokenIdentifier tokenId, Long renewDate)
    Blocking method to store a delegation token along with the current token sequence number to the state storage.
    abstract void
    storeTokenMasterKey(org.apache.hadoop.security.token.delegation.DelegationKey key)
    Blocking method to store a delegation token master key.
    abstract void
    updateToken(org.apache.hadoop.yarn.security.client.TimelineDelegationTokenIdentifier tokenId, Long renewDate)
    Blocking method to update the expiration of a delegation token in the state storage.

    Methods inherited from class org.apache.hadoop.service.AbstractService

    close, getBlockers, getConfig, getFailureCause, getFailureState, getLifecycleHistory, getName, getServiceState, getStartTime, init, isInState, noteFailure, putBlocker, registerGlobalListener, registerServiceListener, removeBlocker, setConfig, start, stop, toString, unregisterGlobalListener, unregisterServiceListener, waitForServiceToStop

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • TimelineStateStore

      public TimelineStateStore()
    • TimelineStateStore

      public TimelineStateStore(String name)
  • Method Details

    • serviceInit

      public void serviceInit(org.apache.hadoop.conf.Configuration conf) throws IOException
      Initialize the state storage
      Overrides:
      serviceInit in class org.apache.hadoop.service.AbstractService
      Parameters:
      conf - the configuration
      Throws:
      IOException
    • serviceStart

      public void serviceStart() throws IOException
      Start the state storage for use
      Overrides:
      serviceStart in class org.apache.hadoop.service.AbstractService
      Throws:
      IOException
    • serviceStop

      public void serviceStop() throws IOException
      Shutdown the state storage.
      Overrides:
      serviceStop in class org.apache.hadoop.service.AbstractService
      Throws:
      IOException
    • initStorage

      protected abstract void initStorage(org.apache.hadoop.conf.Configuration conf) throws IOException
      Implementation-specific initialization.
      Parameters:
      conf - the configuration
      Throws:
      IOException
    • startStorage

      protected abstract void startStorage() throws IOException
      Implementation-specific startup.
      Throws:
      IOException
    • closeStorage

      protected abstract void closeStorage() throws IOException
      Implementation-specific shutdown.
      Throws:
      IOException
    • loadState

      public abstract TimelineStateStore.TimelineServiceState loadState() throws IOException
      Load the timeline service state from the state storage.
      Throws:
      IOException
    • storeToken

      public abstract void storeToken(org.apache.hadoop.yarn.security.client.TimelineDelegationTokenIdentifier tokenId, Long renewDate) throws IOException
      Blocking method to store a delegation token along with the current token sequence number to the state storage. Implementations must not return from this method until the token has been committed to the state store.
      Parameters:
      tokenId - the token to store
      renewDate - the token renewal deadline
      Throws:
      IOException
    • updateToken

      public abstract void updateToken(org.apache.hadoop.yarn.security.client.TimelineDelegationTokenIdentifier tokenId, Long renewDate) throws IOException
      Blocking method to update the expiration of a delegation token in the state storage. Implementations must not return from this method until the expiration date of the token has been updated in the state store.
      Parameters:
      tokenId - the token to update
      renewDate - the new token renewal deadline
      Throws:
      IOException
    • removeToken

      public abstract void removeToken(org.apache.hadoop.yarn.security.client.TimelineDelegationTokenIdentifier tokenId) throws IOException
      Blocking method to remove a delegation token from the state storage. Implementations must not return from this method until the token has been removed from the state store.
      Parameters:
      tokenId - the token to remove
      Throws:
      IOException
    • storeTokenMasterKey

      public abstract void storeTokenMasterKey(org.apache.hadoop.security.token.delegation.DelegationKey key) throws IOException
      Blocking method to store a delegation token master key. Implementations must not return from this method until the key has been committed to the state store.
      Parameters:
      key - the master key to store
      Throws:
      IOException
    • removeTokenMasterKey

      public abstract void removeTokenMasterKey(org.apache.hadoop.security.token.delegation.DelegationKey key) throws IOException
      Blocking method to remove a delegation token master key. Implementations must not return from this method until the key has been removed from the state store.
      Parameters:
      key - the master key to remove
      Throws:
      IOException