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
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.TimelineServiceStateNested classes/interfaces inherited from interface org.apache.hadoop.service.Service
org.apache.hadoop.service.Service.STATE -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidImplementation-specific shutdown.protected voidinitStorage(org.apache.hadoop.conf.Configuration conf) Implementation-specific initialization.Load the timeline service state from the state storage.voidremoveToken(org.apache.hadoop.yarn.security.client.TimelineDelegationTokenIdentifier tokenId) Blocking method to remove a delegation token from the state storage.voidremoveTokenMasterKey(org.apache.hadoop.security.token.delegation.DelegationKey key) Blocking method to remove a delegation token master key.protected voidImplementation-specific startup.voidstoreToken(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.voidstoreTokenMasterKey(org.apache.hadoop.security.token.delegation.DelegationKey key) Blocking method to store a delegation token master key.voidupdateToken(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, serviceStopMethods 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
-
Field Details
-
LOG
public static final org.slf4j.Logger LOG
-
-
Constructor Details
-
LeveldbTimelineStateStore
public LeveldbTimelineStateStore()
-
-
Method Details
-
initStorage
Description copied from class:TimelineStateStoreImplementation-specific initialization.- Specified by:
initStoragein classTimelineStateStore- Parameters:
conf- the configuration- Throws:
IOException
-
startStorage
Description copied from class:TimelineStateStoreImplementation-specific startup.- Specified by:
startStoragein classTimelineStateStore- Throws:
IOException
-
closeStorage
Description copied from class:TimelineStateStoreImplementation-specific shutdown.- Specified by:
closeStoragein classTimelineStateStore- Throws:
IOException
-
loadState
Description copied from class:TimelineStateStoreLoad the timeline service state from the state storage.- Specified by:
loadStatein classTimelineStateStore- Throws:
IOException
-
storeToken
public void storeToken(org.apache.hadoop.yarn.security.client.TimelineDelegationTokenIdentifier tokenId, Long renewDate) throws IOException Description copied from class:TimelineStateStoreBlocking 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:
storeTokenin classTimelineStateStore- Parameters:
tokenId- the token to storerenewDate- 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:TimelineStateStoreBlocking 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:
updateTokenin classTimelineStateStore- Parameters:
tokenId- the token to updaterenewDate- 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:TimelineStateStoreBlocking 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:
removeTokenin classTimelineStateStore- 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:TimelineStateStoreBlocking 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:
storeTokenMasterKeyin classTimelineStateStore- 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:TimelineStateStoreBlocking 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:
removeTokenMasterKeyin classTimelineStateStore- Parameters:
key- the master key to remove- Throws:
IOException
-