@InterfaceAudience.Private @InterfaceStability.Unstable public class FileSystemRMStateStore extends RMStateStore
RMStateStore.ApplicationAttemptState, RMStateStore.ApplicationState, RMStateStore.RMDTSecretManagerState, RMStateStore.RMState| Modifier and Type | Field and Description |
|---|---|
protected static RMStateVersion |
CURRENT_VERSION_INFO |
protected org.apache.hadoop.fs.FileSystem |
fs |
static org.apache.commons.logging.Log |
LOG |
protected static String |
ROOT_DIR_NAME |
AM_CLIENT_TOKEN_MASTER_KEY_NAME, AM_RM_TOKEN_SERVICE, DELEGATION_KEY_PREFIX, DELEGATION_TOKEN_PREFIX, DELEGATION_TOKEN_SEQUENCE_NUMBER_PREFIX, EPOCH_NODE, RM_APP_ROOT, RM_DT_SECRET_MANAGER_ROOT, VERSION_NODE| Constructor and Description |
|---|
FileSystemRMStateStore() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
closeInternal()
Derived classes close themselves using this method.
|
int |
getAndIncrementEpoch()
Get the current epoch of RM and increment the value.
|
protected RMStateVersion |
getCurrentVersion()
Get the current version of the underlying state store.
|
void |
initInternal(org.apache.hadoop.conf.Configuration conf)
Derived classes initialize themselves using this method.
|
RMStateStore.RMState |
loadState()
Blocking API
The derived class must recover state from the store and return a new
RMState object populated with that state
This must not be called on the dispatcher thread
|
protected RMStateVersion |
loadVersion()
Derived class use this method to load the version information from state
store.
|
void |
removeApplicationStateInternal(RMStateStore.ApplicationState appState)
Blocking API
Derived classes must implement this method to remove the state of an
application and its attempts
|
void |
removeRMDelegationTokenState(org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier identifier)
Blocking API
Derived classes must implement this method to remove the state of RMDelegationToken
|
void |
removeRMDTMasterKeyState(org.apache.hadoop.security.token.delegation.DelegationKey masterKey)
Blocking API
Derived classes must implement this method to remove the state of
DelegationToken Master Key
|
protected void |
replaceFile(org.apache.hadoop.fs.Path srcPath,
org.apache.hadoop.fs.Path dstPath) |
protected void |
startInternal()
Derived classes start themselves using this method.
|
void |
storeApplicationAttemptStateInternal(org.apache.hadoop.yarn.api.records.ApplicationAttemptId appAttemptId,
ApplicationAttemptStateData attemptStateDataPB)
Blocking API
Derived classes must implement this method to store the state of an
application attempt
|
void |
storeApplicationStateInternal(org.apache.hadoop.yarn.api.records.ApplicationId appId,
ApplicationStateData appStateDataPB)
Blocking API
Derived classes must implement this method to store the state of an
application.
|
void |
storeRMDelegationTokenAndSequenceNumberState(org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier identifier,
Long renewDate,
int latestSequenceNumber)
Blocking API
Derived classes must implement this method to store the state of
RMDelegationToken and sequence number
|
void |
storeRMDTMasterKeyState(org.apache.hadoop.security.token.delegation.DelegationKey masterKey)
Blocking API
Derived classes must implement this method to store the state of
DelegationToken Master Key
|
protected void |
storeVersion()
Derived class use this method to store the version information.
|
void |
updateApplicationAttemptStateInternal(org.apache.hadoop.yarn.api.records.ApplicationAttemptId appAttemptId,
ApplicationAttemptStateData attemptStateDataPB) |
void |
updateApplicationStateInternal(org.apache.hadoop.yarn.api.records.ApplicationId appId,
ApplicationStateData appStateDataPB) |
protected void |
updateFile(org.apache.hadoop.fs.Path outputPath,
byte[] data) |
protected void |
updateRMDelegationTokenAndSequenceNumberInternal(org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier rmDTIdentifier,
Long renewDate,
int latestSequenceNumber)
Blocking API
Derived classes must implement this method to update the state of
RMDelegationToken and sequence number
|
checkVersion, getCredentialsFromAppAttempt, handleStoreEvent, notifyStoreOperationFailed, removeApplication, removeRMDelegationToken, removeRMDTMasterKey, serviceInit, serviceStart, serviceStop, setRMDispatcher, storeNewApplication, storeNewApplicationAttempt, storeRMDelegationTokenAndSequenceNumber, storeRMDTMasterKey, updateApplicationAttemptState, updateApplicationState, updateRMDelegationTokenAndSequenceNumberclose, getBlockers, getConfig, getFailureCause, getFailureState, getLifecycleHistory, getName, getServiceState, getStartTime, init, isInState, noteFailure, putBlocker, registerGlobalListener, registerServiceListener, removeBlocker, setConfig, start, stop, toString, unregisterGlobalListener, unregisterServiceListener, waitForServiceToStoppublic static final org.apache.commons.logging.Log LOG
protected static final String ROOT_DIR_NAME
protected static final RMStateVersion CURRENT_VERSION_INFO
protected org.apache.hadoop.fs.FileSystem fs
public void initInternal(org.apache.hadoop.conf.Configuration conf)
throws Exception
RMStateStoreinitInternal in class RMStateStoreExceptionprotected void startInternal()
throws Exception
RMStateStorestartInternal in class RMStateStoreExceptionprotected void closeInternal()
throws Exception
RMStateStorecloseInternal in class RMStateStoreExceptionprotected RMStateVersion getCurrentVersion()
RMStateStoregetCurrentVersion in class RMStateStoreprotected RMStateVersion loadVersion() throws Exception
RMStateStoreloadVersion in class RMStateStoreExceptionprotected void storeVersion()
throws Exception
RMStateStorestoreVersion in class RMStateStoreExceptionpublic int getAndIncrementEpoch()
throws Exception
RMStateStoregetAndIncrementEpoch in class RMStateStoreExceptionpublic RMStateStore.RMState loadState() throws Exception
RMStateStoreloadState in class RMStateStoreExceptionpublic void storeApplicationStateInternal(org.apache.hadoop.yarn.api.records.ApplicationId appId,
ApplicationStateData appStateDataPB)
throws Exception
RMStateStorestoreApplicationStateInternal in class RMStateStoreExceptionpublic void updateApplicationStateInternal(org.apache.hadoop.yarn.api.records.ApplicationId appId,
ApplicationStateData appStateDataPB)
throws Exception
updateApplicationStateInternal in class RMStateStoreExceptionpublic void storeApplicationAttemptStateInternal(org.apache.hadoop.yarn.api.records.ApplicationAttemptId appAttemptId,
ApplicationAttemptStateData attemptStateDataPB)
throws Exception
RMStateStorestoreApplicationAttemptStateInternal in class RMStateStoreExceptionpublic void updateApplicationAttemptStateInternal(org.apache.hadoop.yarn.api.records.ApplicationAttemptId appAttemptId,
ApplicationAttemptStateData attemptStateDataPB)
throws Exception
updateApplicationAttemptStateInternal in class RMStateStoreExceptionpublic void removeApplicationStateInternal(RMStateStore.ApplicationState appState) throws Exception
RMStateStoreremoveApplicationStateInternal in class RMStateStoreExceptionpublic void storeRMDelegationTokenAndSequenceNumberState(org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier identifier,
Long renewDate,
int latestSequenceNumber)
throws Exception
RMStateStorestoreRMDelegationTokenAndSequenceNumberState in class RMStateStoreExceptionpublic void removeRMDelegationTokenState(org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier identifier)
throws Exception
RMStateStoreremoveRMDelegationTokenState in class RMStateStoreExceptionprotected void updateRMDelegationTokenAndSequenceNumberInternal(org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier rmDTIdentifier,
Long renewDate,
int latestSequenceNumber)
throws Exception
RMStateStoreupdateRMDelegationTokenAndSequenceNumberInternal in class RMStateStoreExceptionpublic void storeRMDTMasterKeyState(org.apache.hadoop.security.token.delegation.DelegationKey masterKey)
throws Exception
RMStateStorestoreRMDTMasterKeyState in class RMStateStoreExceptionpublic void removeRMDTMasterKeyState(org.apache.hadoop.security.token.delegation.DelegationKey masterKey)
throws Exception
RMStateStoreremoveRMDTMasterKeyState in class RMStateStoreExceptionprotected void updateFile(org.apache.hadoop.fs.Path outputPath,
byte[] data)
throws Exception
ExceptionCopyright © 2014 Apache Software Foundation. All Rights Reserved.