public class LeveldbRMStateStore extends RMStateStore
RMStateStore.RMDTSecretManagerState, RMStateStore.RMState, RMStateStore.RMStateStoreState
Modifier and Type | Field and Description |
---|---|
static org.apache.commons.logging.Log |
LOG |
AM_CLIENT_TOKEN_MASTER_KEY_NAME, AM_RM_TOKEN_SERVICE, AMRMTOKEN_SECRET_MANAGER_ROOT, DELEGATION_KEY_PREFIX, DELEGATION_TOKEN_PREFIX, DELEGATION_TOKEN_SEQUENCE_NUMBER_PREFIX, EPOCH_NODE, RESERVATION_SYSTEM_ROOT, resourceManager, RM_APP_ROOT, RM_DT_SECRET_MANAGER_ROOT, VERSION_NODE
Constructor and Description |
---|
LeveldbRMStateStore() |
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.yarn.server.records.Version |
getCurrentVersion()
Get the current version of the underlying state store.
|
protected 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.
|
protected org.iq80.leveldb.DB |
openDatabase() |
void |
removeApplication(org.apache.hadoop.yarn.api.records.ApplicationId removeAppId)
Derived classes must implement this method to remove application from the
state store
|
protected 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.
|
protected void |
removeRMDelegationTokenState(org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier tokenId)
Blocking API
Derived classes must implement this method to remove the state of RMDelegationToken
|
protected 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 |
startInternal()
Derived classes start themselves using this method.
|
protected void |
storeApplicationAttemptStateInternal(org.apache.hadoop.yarn.api.records.ApplicationAttemptId attemptId,
ApplicationAttemptStateData attemptStateData)
Blocking API
Derived classes must implement this method to store the state of an
application attempt
|
protected void |
storeApplicationStateInternal(org.apache.hadoop.yarn.api.records.ApplicationId appId,
ApplicationStateData appStateData)
Blocking API
Derived classes must implement this method to store the state of an
application.
|
void |
storeOrUpdateAMRMTokenSecretManagerState(AMRMTokenSecretManagerState state,
boolean isUpdate)
Blocking API Derived classes must implement this method to store or update
the state of AMRMToken Master 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.
|
protected void |
storeRMDelegationTokenState(org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier tokenId,
Long renewDate)
Blocking API
Derived classes must implement this method to store the state of
RMDelegationToken and sequence number
|
protected 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.
|
protected void |
updateApplicationAttemptStateInternal(org.apache.hadoop.yarn.api.records.ApplicationAttemptId attemptId,
ApplicationAttemptStateData attemptStateData) |
protected void |
updateApplicationStateInternal(org.apache.hadoop.yarn.api.records.ApplicationId appId,
ApplicationStateData appStateData) |
protected void |
updateRMDelegationTokenState(org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier tokenId,
Long renewDate)
Blocking API
Derived classes must implement this method to update the state of
RMDelegationToken and sequence number
|
checkVersion, getCredentialsFromAppAttempt, getRMStateStoreState, handleStoreEvent, isFencedState, notifyStoreOperationFailed, removeApplication, removeReservation, removeRMDelegationToken, removeRMDTMasterKey, serviceInit, serviceStart, serviceStop, setResourceManager, setRMDispatcher, storeNewApplication, storeNewApplicationAttempt, storeNewReservation, storeOrUpdateAMRMTokenSecretManager, storeRMDelegationToken, storeRMDTMasterKey, updateApplicationAttemptState, 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
protected void initInternal(org.apache.hadoop.conf.Configuration conf) throws Exception
RMStateStore
initInternal
in class RMStateStore
Exception
protected void startInternal() throws Exception
RMStateStore
startInternal
in class RMStateStore
Exception
protected void closeInternal() throws Exception
RMStateStore
closeInternal
in class RMStateStore
Exception
protected org.apache.hadoop.yarn.server.records.Version loadVersion() throws Exception
RMStateStore
loadVersion
in class RMStateStore
Exception
protected void storeVersion() throws Exception
RMStateStore
storeVersion
in class RMStateStore
Exception
protected org.apache.hadoop.yarn.server.records.Version getCurrentVersion()
RMStateStore
getCurrentVersion
in class RMStateStore
public long getAndIncrementEpoch() throws Exception
RMStateStore
getAndIncrementEpoch
in class RMStateStore
Exception
public RMStateStore.RMState loadState() throws Exception
RMStateStore
loadState
in class RMStateStore
Exception
protected void storeApplicationStateInternal(org.apache.hadoop.yarn.api.records.ApplicationId appId, ApplicationStateData appStateData) throws IOException
RMStateStore
storeApplicationStateInternal
in class RMStateStore
IOException
protected void updateApplicationStateInternal(org.apache.hadoop.yarn.api.records.ApplicationId appId, ApplicationStateData appStateData) throws IOException
updateApplicationStateInternal
in class RMStateStore
IOException
protected void storeApplicationAttemptStateInternal(org.apache.hadoop.yarn.api.records.ApplicationAttemptId attemptId, ApplicationAttemptStateData attemptStateData) throws IOException
RMStateStore
storeApplicationAttemptStateInternal
in class RMStateStore
IOException
protected void updateApplicationAttemptStateInternal(org.apache.hadoop.yarn.api.records.ApplicationAttemptId attemptId, ApplicationAttemptStateData attemptStateData) throws IOException
updateApplicationAttemptStateInternal
in class RMStateStore
IOException
protected void removeApplicationStateInternal(ApplicationStateData appState) throws IOException
RMStateStore
removeApplicationStateInternal
in class RMStateStore
IOException
protected void storeReservationState(org.apache.hadoop.yarn.proto.YarnProtos.ReservationAllocationStateProto reservationAllocation, String planName, String reservationIdName) throws Exception
RMStateStore
storeReservationState
in class RMStateStore
Exception
protected void removeReservationState(String planName, String reservationIdName) throws Exception
RMStateStore
removeReservationState
in class RMStateStore
Exception
protected void storeRMDelegationTokenState(org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier tokenId, Long renewDate) throws IOException
RMStateStore
storeRMDelegationTokenState
in class RMStateStore
IOException
protected void updateRMDelegationTokenState(org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier tokenId, Long renewDate) throws IOException
RMStateStore
updateRMDelegationTokenState
in class RMStateStore
IOException
protected void removeRMDelegationTokenState(org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier tokenId) throws IOException
RMStateStore
removeRMDelegationTokenState
in class RMStateStore
IOException
protected void storeRMDTMasterKeyState(org.apache.hadoop.security.token.delegation.DelegationKey masterKey) throws IOException
RMStateStore
storeRMDTMasterKeyState
in class RMStateStore
IOException
protected void removeRMDTMasterKeyState(org.apache.hadoop.security.token.delegation.DelegationKey masterKey) throws IOException
RMStateStore
removeRMDTMasterKeyState
in class RMStateStore
IOException
public void storeOrUpdateAMRMTokenSecretManagerState(AMRMTokenSecretManagerState state, boolean isUpdate)
RMStateStore
storeOrUpdateAMRMTokenSecretManagerState
in class RMStateStore
public void deleteStore() throws IOException
RMStateStore
deleteStore
in class RMStateStore
IOException
public void removeApplication(org.apache.hadoop.yarn.api.records.ApplicationId removeAppId) throws IOException
RMStateStore
removeApplication
in class RMStateStore
IOException
Copyright © 2017 Apache Software Foundation. All Rights Reserved.