Class LeveldbTimelineStateStore

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

public class LeveldbTimelineStateStore extends TimelineStateStore
A timeline service state storage implementation that supports any persistent storage that adheres to the LevelDB interface.
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.apache.hadoop.yarn.server.timeline.recovery.TimelineStateStore

    TimelineStateStore.TimelineServiceState

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

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

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

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    Implementation-specific shutdown.
    protected void
    initStorage(org.apache.hadoop.conf.Configuration conf)
    Implementation-specific initialization.
    Load the timeline service state from the state storage.
    void
    removeToken(org.apache.hadoop.yarn.security.client.TimelineDelegationTokenIdentifier tokenId)
    Blocking method to remove a delegation token from the state storage.
    void
    removeTokenMasterKey(org.apache.hadoop.security.token.delegation.DelegationKey key)
    Blocking method to remove a delegation token master key.
    protected void
    Implementation-specific startup.
    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.
    void
    storeTokenMasterKey(org.apache.hadoop.security.token.delegation.DelegationKey key)
    Blocking method to store a delegation token master key.
    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.yarn.server.timeline.recovery.TimelineStateStore

    serviceInit, serviceStart, serviceStop

    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
  • Field Details

    • LOG

      public static final org.slf4j.Logger LOG
  • Constructor Details

    • LeveldbTimelineStateStore

      public LeveldbTimelineStateStore()
  • Method Details

    • initStorage

      protected void initStorage(org.apache.hadoop.conf.Configuration conf) throws IOException
      Description copied from class: TimelineStateStore
      Implementation-specific initialization.
      Specified by:
      initStorage in class TimelineStateStore
      Parameters:
      conf - the configuration
      Throws:
      IOException
    • startStorage

      protected void startStorage() throws IOException
      Description copied from class: TimelineStateStore
      Implementation-specific startup.
      Specified by:
      startStorage in class TimelineStateStore
      Throws:
      IOException
    • closeStorage

      protected void closeStorage() throws IOException
      Description copied from class: TimelineStateStore
      Implementation-specific shutdown.
      Specified by:
      closeStorage in class TimelineStateStore
      Throws:
      IOException
    • loadState

      Description copied from class: TimelineStateStore
      Load the timeline service state from the state storage.
      Specified by:
      loadState in class TimelineStateStore
      Throws:
      IOException
    • storeToken

      public void storeToken(org.apache.hadoop.yarn.security.client.TimelineDelegationTokenIdentifier tokenId, Long renewDate) throws IOException
      Description copied from class: TimelineStateStore
      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.
      Specified by:
      storeToken in class TimelineStateStore
      Parameters:
      tokenId - the token to store
      renewDate - the token renewal deadline
      Throws:
      IOException
    • updateToken

      public void updateToken(org.apache.hadoop.yarn.security.client.TimelineDelegationTokenIdentifier tokenId, Long renewDate) throws IOException
      Description copied from class: TimelineStateStore
      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.
      Specified by:
      updateToken in class TimelineStateStore
      Parameters:
      tokenId - the token to update
      renewDate - the new token renewal deadline
      Throws:
      IOException
    • removeToken

      public void removeToken(org.apache.hadoop.yarn.security.client.TimelineDelegationTokenIdentifier tokenId) throws IOException
      Description copied from class: TimelineStateStore
      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.
      Specified by:
      removeToken in class TimelineStateStore
      Parameters:
      tokenId - the token to remove
      Throws:
      IOException
    • storeTokenMasterKey

      public void storeTokenMasterKey(org.apache.hadoop.security.token.delegation.DelegationKey key) throws IOException
      Description copied from class: TimelineStateStore
      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.
      Specified by:
      storeTokenMasterKey in class TimelineStateStore
      Parameters:
      key - the master key to store
      Throws:
      IOException
    • removeTokenMasterKey

      public void removeTokenMasterKey(org.apache.hadoop.security.token.delegation.DelegationKey key) throws IOException
      Description copied from class: TimelineStateStore
      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.
      Specified by:
      removeTokenMasterKey in class TimelineStateStore
      Parameters:
      key - the master key to remove
      Throws:
      IOException