@InterfaceAudience.Private @InterfaceStability.Unstable public class MemoryRMStateStore extends RMStateStore
RMStateStore.ProxyCAState, RMStateStore.RMDTSecretManagerState, RMStateStore.RMState, RMStateStore.RMStateStoreState
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, LOG, 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 |
---|
MemoryRMStateStore() |
Modifier and Type | Method and Description |
---|---|
void |
checkVersion()
1) Versioning scheme: major.minor.
|
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.yarn.server.records.Version |
getCurrentVersion()
Get the current version of the underlying state store.
|
RMStateStore.RMState |
getState() |
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 rmDTIdentifier)
Blocking API
Derived classes must implement this method to remove the state of RMDelegationToken.
|
void |
removeRMDTMasterKeyState(org.apache.hadoop.security.token.delegation.DelegationKey delegationKey)
Blocking API
Derived classes must implement this method to remove the state of
DelegationToken Master Key.
|
protected void |
startInternal()
Derived classes start themselves using this method.
|
void |
storeApplicationAttemptStateInternal(org.apache.hadoop.yarn.api.records.ApplicationAttemptId appAttemptId,
ApplicationAttemptStateData attemptState)
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 appState)
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 rmDTIdentifier,
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 delegationKey)
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 attemptState) |
void |
updateApplicationStateInternal(org.apache.hadoop.yarn.api.records.ApplicationId appId,
ApplicationStateData appState) |
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.
|
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, updateRMDelegationToken
close, getBlockers, getConfig, getFailureCause, getFailureState, getLifecycleHistory, getName, getServiceState, getStartTime, init, isInState, noteFailure, putBlocker, registerGlobalListener, registerServiceListener, removeBlocker, setConfig, start, stop, toString, unregisterGlobalListener, unregisterServiceListener, waitForServiceToStop
@VisibleForTesting public RMStateStore.RMState getState()
public void checkVersion() throws Exception
RMStateStore
checkVersion
in class RMStateStore
Exception
- error occur.public long getAndIncrementEpoch() throws Exception
RMStateStore
getAndIncrementEpoch
in class RMStateStore
Exception
- error occur.public RMStateStore.RMState loadState() throws Exception
RMStateStore
loadState
in class RMStateStore
Exception
- error occur.public void initInternal(org.apache.hadoop.conf.Configuration conf)
RMStateStore
initInternal
in class RMStateStore
conf
- Configuration.protected void startInternal() throws Exception
RMStateStore
startInternal
in class RMStateStore
Exception
- error occur.protected void closeInternal() throws Exception
RMStateStore
closeInternal
in class RMStateStore
Exception
- error occur.public void storeApplicationStateInternal(org.apache.hadoop.yarn.api.records.ApplicationId appId, ApplicationStateData appState) throws Exception
RMStateStore
storeApplicationStateInternal
in class RMStateStore
appId
- application Id.appState
- application StateData.Exception
- error occur.public void updateApplicationStateInternal(org.apache.hadoop.yarn.api.records.ApplicationId appId, ApplicationStateData appState) throws Exception
updateApplicationStateInternal
in class RMStateStore
Exception
public void storeApplicationAttemptStateInternal(org.apache.hadoop.yarn.api.records.ApplicationAttemptId appAttemptId, ApplicationAttemptStateData attemptState) throws Exception
RMStateStore
storeApplicationAttemptStateInternal
in class RMStateStore
appAttemptId
- Application AttemptId.attemptState
- Application AttemptStateData.Exception
- error occur.public void updateApplicationAttemptStateInternal(org.apache.hadoop.yarn.api.records.ApplicationAttemptId appAttemptId, ApplicationAttemptStateData attemptState) throws Exception
updateApplicationAttemptStateInternal
in class RMStateStore
Exception
public void removeApplicationAttemptInternal(org.apache.hadoop.yarn.api.records.ApplicationAttemptId appAttemptId) throws Exception
RMStateStore
removeApplicationAttemptInternal
in class RMStateStore
appAttemptId
- application attempt id.Exception
- exception occurs.public void removeApplicationStateInternal(ApplicationStateData appState) throws Exception
RMStateStore
removeApplicationStateInternal
in class RMStateStore
appState
- ApplicationStateData.Exception
- error occurs.public void storeRMDelegationTokenState(org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier rmDTIdentifier, Long renewDate) throws Exception
RMStateStore
storeRMDelegationTokenState
in class RMStateStore
rmDTIdentifier
- RMDelegationTokenIdentifier.renewDate
- token renew date.Exception
- error occur.public void removeRMDelegationTokenState(org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier rmDTIdentifier) throws Exception
RMStateStore
removeRMDelegationTokenState
in class RMStateStore
rmDTIdentifier
- RMDelegationTokenIdentifier.Exception
- error occurs.protected void updateRMDelegationTokenState(org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier rmDTIdentifier, Long renewDate) throws Exception
RMStateStore
updateRMDelegationTokenState
in class RMStateStore
rmDTIdentifier
- RMDelegationTokenIdentifier.renewDate
- token renew date.Exception
- error occurs.public void storeRMDTMasterKeyState(org.apache.hadoop.security.token.delegation.DelegationKey delegationKey) throws Exception
RMStateStore
storeRMDTMasterKeyState
in class RMStateStore
delegationKey
- DelegationToken Master Key.Exception
- error occur.public void removeRMDTMasterKeyState(org.apache.hadoop.security.token.delegation.DelegationKey delegationKey) throws Exception
RMStateStore
removeRMDTMasterKeyState
in class RMStateStore
delegationKey
- DelegationKey.Exception
- exception occurs.protected void storeReservationState(org.apache.hadoop.yarn.proto.YarnProtos.ReservationAllocationStateProto reservationAllocation, String planName, String reservationIdName) throws Exception
RMStateStore
storeReservationState
in class RMStateStore
reservationAllocation
- reservation Allocation.planName
- plan Name.reservationIdName
- reservationId Name.Exception
- error occurs.protected void removeReservationState(String planName, String reservationIdName) throws Exception
RMStateStore
removeReservationState
in class RMStateStore
planName
- plan Name.reservationIdName
- reservationId Name.Exception
- exception occurs.protected void storeProxyCACertState(X509Certificate caCert, PrivateKey caPrivateKey) throws Exception
RMStateStore
storeProxyCACertState
in class RMStateStore
caCert
- X509Certificate.caPrivateKey
- PrivateKey.Exception
- error occurs.protected org.apache.hadoop.yarn.server.records.Version loadVersion() throws Exception
RMStateStore
loadVersion
in class RMStateStore
Exception
- error occur.protected void storeVersion() throws Exception
RMStateStore
storeVersion
in class RMStateStore
Exception
- error occur.protected org.apache.hadoop.yarn.server.records.Version getCurrentVersion()
RMStateStore
getCurrentVersion
in class RMStateStore
public void storeOrUpdateAMRMTokenSecretManagerState(AMRMTokenSecretManagerState amrmTokenSecretManagerState, boolean isUpdate)
RMStateStore
storeOrUpdateAMRMTokenSecretManagerState
in class RMStateStore
amrmTokenSecretManagerState
- amrmTokenSecretManagerState.isUpdate
- true, update; otherwise not update.public void deleteStore() throws Exception
RMStateStore
deleteStore
in class RMStateStore
Exception
- exception occurs.public void removeApplication(org.apache.hadoop.yarn.api.records.ApplicationId removeAppId) throws Exception
RMStateStore
removeApplication
in class RMStateStore
removeAppId
- application Id.Exception
- exception occurs.Copyright © 2008–2024 Apache Software Foundation. All rights reserved.