@InterfaceAudience.Private @InterfaceStability.Unstable public class FileSystemRMStateStore extends RMStateStore
RMStateStore.ProxyCAState, RMStateStore.RMDTSecretManagerState, RMStateStore.RMState, RMStateStore.RMStateStoreState| Modifier and Type | Field and Description |
|---|---|
protected static String |
AMRMTOKEN_SECRET_MANAGER_NODE |
protected static org.apache.hadoop.yarn.server.records.Version |
CURRENT_VERSION_INFO |
protected org.apache.hadoop.fs.FileSystem |
fs |
protected org.apache.hadoop.conf.Configuration |
fsConf |
static org.slf4j.Logger |
LOG |
protected static String |
ROOT_DIR_NAME |
AM_CLIENT_TOKEN_MASTER_KEY_NAME, AM_RM_TOKEN_SERVICE, AMRMTOKEN_SECRET_MANAGER_ROOT, baseEpoch, DELEGATION_KEY_PREFIX, DELEGATION_TOKEN_PREFIX, DELEGATION_TOKEN_SEQUENCE_NUMBER_PREFIX, EPOCH_NODE, PROXY_CA_CERT_NODE, PROXY_CA_PRIVATE_KEY_NODE, PROXY_CA_ROOT, RESERVATION_SYSTEM_ROOT, resourceManager, RM_APP_ROOT, RM_DELEGATION_TOKENS_ROOT_ZNODE_NAME, RM_DT_SECRET_MANAGER_ROOT, rmStateStoreEventHandler, VERSION_NODE| Constructor and Description |
|---|
FileSystemRMStateStore() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
closeInternal()
Derived classes close themselves using this method.
|
void |
deleteStore()
Derived classes must implement this method to delete the state store
|
long |
getAndIncrementEpoch()
Get the current epoch of RM and increment the value.
|
protected org.apache.hadoop.fs.Path |
getAppAttemptDir(org.apache.hadoop.yarn.api.records.ApplicationAttemptId appAttId) |
protected org.apache.hadoop.fs.Path |
getAppDir(org.apache.hadoop.yarn.api.records.ApplicationId appId) |
protected org.apache.hadoop.yarn.server.records.Version |
getCurrentVersion()
Get the current version of the underlying state store.
|
int |
getNumRetries() |
long |
getRetryInterval() |
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 org.apache.hadoop.yarn.server.records.Version |
loadVersion()
Derived class use this method to load the version information from state
store.
|
void |
removeApplication(org.apache.hadoop.yarn.api.records.ApplicationId removeAppId)
Derived classes must implement this method to remove application from the
state store
|
void |
removeApplicationAttemptInternal(org.apache.hadoop.yarn.api.records.ApplicationAttemptId appAttemptId)
Blocking API
Derived classes must implement this method to remove the state of specified
attempt.
|
void |
removeApplicationStateInternal(ApplicationStateData appState)
Blocking API
Derived classes must implement this method to remove the state of an
application and its attempts
|
protected void |
removeReservationState(String planName,
String reservationIdName)
Blocking API
Derived classes must implement this method to remove the state of
a reservation allocation.
|
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 |
storeOrUpdateAMRMTokenSecretManagerState(AMRMTokenSecretManagerState amrmTokenSecretManagerState,
boolean isUpdate)
Blocking API Derived classes must implement this method to store or update
the state of AMRMToken Master Key
|
protected void |
storeProxyCACertState(X509Certificate caCert,
PrivateKey caPrivateKey)
Blocking API
Derived classes must implement this method to store the CA Certificate
and Private Key
|
protected void |
storeReservationState(org.apache.hadoop.yarn.proto.YarnProtos.ReservationAllocationStateProto reservationAllocation,
String planName,
String reservationIdName)
Blocking API
Derived classes must implement this method to store the state of
a reservation allocation.
|
void |
storeRMDelegationTokenState(org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier identifier,
Long renewDate)
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,
boolean makeUnreadableByAdmin) |
protected void |
updateRMDelegationTokenState(org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier rmDTIdentifier,
Long renewDate)
Blocking API
Derived classes must implement this method to update the state of
RMDelegationToken and sequence number
|
protected void |
writeFile(org.apache.hadoop.fs.Path outputPath,
byte[] data,
boolean makeUnreadableByAdmin) |
checkVersion, getCredentialsFromAppAttempt, getRMStateStoreEventHandler, getRMStateStoreState, handleStoreEvent, isFencedState, nextEpoch, notifyStoreOperationFailed, removeApplication, removeApplicationAttempt, removeReservation, removeRMDelegationToken, removeRMDTMasterKey, serviceInit, serviceStart, serviceStop, setResourceManager, setRMDispatcher, storeNewApplication, storeNewApplicationAttempt, storeNewReservation, storeOrUpdateAMRMTokenSecretManager, storeProxyCACert, storeRMDelegationToken, storeRMDTMasterKey, updateApplicationAttemptState, updateApplicationState, updateApplicationState, updateApplicationStateSynchronously, updateFencedState, updateRMDelegationTokenclose, 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.slf4j.Logger LOG
protected static final String ROOT_DIR_NAME
protected static final org.apache.hadoop.yarn.server.records.Version CURRENT_VERSION_INFO
protected static final String AMRMTOKEN_SECRET_MANAGER_NODE
protected org.apache.hadoop.fs.FileSystem fs
protected org.apache.hadoop.conf.Configuration fsConf
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 org.apache.hadoop.yarn.server.records.Version getCurrentVersion()
RMStateStoregetCurrentVersion in class RMStateStoreprotected org.apache.hadoop.yarn.server.records.Version loadVersion()
throws Exception
RMStateStoreloadVersion in class RMStateStoreExceptionprotected void storeVersion()
throws Exception
RMStateStorestoreVersion in class RMStateStoreExceptionpublic long 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 removeApplicationAttemptInternal(org.apache.hadoop.yarn.api.records.ApplicationAttemptId appAttemptId)
throws Exception
RMStateStoreremoveApplicationAttemptInternal in class RMStateStoreExceptionpublic void removeApplicationStateInternal(ApplicationStateData appState) throws Exception
RMStateStoreremoveApplicationStateInternal in class RMStateStoreExceptionpublic void storeRMDelegationTokenState(org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier identifier,
Long renewDate)
throws Exception
RMStateStorestoreRMDelegationTokenState in class RMStateStoreExceptionpublic void removeRMDelegationTokenState(org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier identifier)
throws Exception
RMStateStoreremoveRMDelegationTokenState in class RMStateStoreExceptionprotected void updateRMDelegationTokenState(org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier rmDTIdentifier,
Long renewDate)
throws Exception
RMStateStoreupdateRMDelegationTokenState 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 RMStateStoreExceptionpublic void deleteStore()
throws Exception
RMStateStoredeleteStore in class RMStateStoreExceptionpublic void removeApplication(org.apache.hadoop.yarn.api.records.ApplicationId removeAppId)
throws Exception
RMStateStoreremoveApplication in class RMStateStoreExceptionprotected void storeProxyCACertState(X509Certificate caCert, PrivateKey caPrivateKey) throws Exception
RMStateStorestoreProxyCACertState in class RMStateStoreExceptionprotected org.apache.hadoop.fs.Path getAppDir(org.apache.hadoop.yarn.api.records.ApplicationId appId)
protected org.apache.hadoop.fs.Path getAppAttemptDir(org.apache.hadoop.yarn.api.records.ApplicationAttemptId appAttId)
protected void writeFile(org.apache.hadoop.fs.Path outputPath,
byte[] data,
boolean makeUnreadableByAdmin)
throws Exception
Exceptionprotected void updateFile(org.apache.hadoop.fs.Path outputPath,
byte[] data,
boolean makeUnreadableByAdmin)
throws Exception
Exceptionprotected void replaceFile(org.apache.hadoop.fs.Path srcPath,
org.apache.hadoop.fs.Path dstPath)
throws Exception
Exceptionpublic void storeOrUpdateAMRMTokenSecretManagerState(AMRMTokenSecretManagerState amrmTokenSecretManagerState, boolean isUpdate) throws Exception
RMStateStorestoreOrUpdateAMRMTokenSecretManagerState in class RMStateStoreExceptionprotected void storeReservationState(org.apache.hadoop.yarn.proto.YarnProtos.ReservationAllocationStateProto reservationAllocation,
String planName,
String reservationIdName)
throws Exception
RMStateStorestoreReservationState in class RMStateStoreExceptionprotected void removeReservationState(String planName, String reservationIdName) throws Exception
RMStateStoreremoveReservationState in class RMStateStoreExceptionpublic int getNumRetries()
public long getRetryInterval()
Copyright © 2008–2023 Apache Software Foundation. All rights reserved.