@InterfaceAudience.Private
 @InterfaceStability.Unstable
public abstract class NMStateStoreService
extends org.apache.hadoop.service.AbstractService
| Modifier and Type | Class and Description | 
|---|---|
| static class  | NMStateStoreService.LocalResourceTrackerState | 
| static class  | NMStateStoreService.RecoveredAMRMProxyStateRecovered states for AMRMProxy. | 
| static class  | NMStateStoreService.RecoveredApplicationsState | 
| static class  | NMStateStoreService.RecoveredContainerState | 
| static class  | NMStateStoreService.RecoveredContainerStatus | 
| static class  | NMStateStoreService.RecoveredContainerTokensState | 
| static class  | NMStateStoreService.RecoveredContainerTypeType of post recovery action. | 
| static class  | NMStateStoreService.RecoveredDeletionServiceState | 
| static class  | NMStateStoreService.RecoveredLocalizationState | 
| static class  | NMStateStoreService.RecoveredLogDeleterState | 
| static class  | NMStateStoreService.RecoveredNMTokensState | 
| static class  | NMStateStoreService.RecoveredUserResources | 
| Constructor and Description | 
|---|
| NMStateStoreService(String name) | 
| Modifier and Type | Method and Description | 
|---|---|
| boolean | canRecover() | 
| protected abstract void | closeStorage() | 
| abstract void | finishResourceLocalization(String user,
                          org.apache.hadoop.yarn.api.records.ApplicationId appId,
                          org.apache.hadoop.yarn.proto.YarnServerNodemanagerRecoveryProtos.LocalizedResourceProto proto)Record the completion of a resource localization | 
| abstract RecoveryIterator<NMStateStoreService.RecoveredContainerState> | getContainerStateIterator()get the Recovered Container State Iterator | 
| protected NodeStatusUpdater | getNodeStatusUpdater() | 
| protected abstract void | initStorage(org.apache.hadoop.conf.Configuration conf) | 
| boolean | isNewlyCreated() | 
| abstract NMStateStoreService.RecoveredAMRMProxyState | loadAMRMProxyState()Load the state of AMRMProxy. | 
| abstract NMStateStoreService.RecoveredApplicationsState | loadApplicationsState()Load the state of applications. | 
| abstract NMStateStoreService.RecoveredContainerTokensState | loadContainerTokensState()Load the state of container tokens | 
| abstract NMStateStoreService.RecoveredDeletionServiceState | loadDeletionServiceState()Load the state of the deletion service | 
| abstract NMStateStoreService.RecoveredLocalizationState | loadLocalizationState()Load the state of localized resources | 
| abstract NMStateStoreService.RecoveredLogDeleterState | loadLogDeleterState()Load the state of log deleters | 
| abstract NMStateStoreService.RecoveredNMTokensState | loadNMTokensState()Load the state of NM tokens | 
| abstract void | removeAMRMProxyAppContext(org.apache.hadoop.yarn.api.records.ApplicationAttemptId attempt)Remove the entire context map for an application attempt in
 AMRMProxyService. | 
| abstract void | removeAMRMProxyAppContextEntry(org.apache.hadoop.yarn.api.records.ApplicationAttemptId attempt,
                              String key)Remove a context entry for an application attempt in AMRMProxyService. | 
| abstract void | removeApplication(org.apache.hadoop.yarn.api.records.ApplicationId appId)Remove records corresponding to an application | 
| abstract void | removeContainer(org.apache.hadoop.yarn.api.records.ContainerId containerId)Remove records corresponding to a container | 
| abstract void | removeContainerPaused(org.apache.hadoop.yarn.api.records.ContainerId containerId)Record that a container has been resumed at the NM by removing the
 fact that it has be paused. | 
| abstract void | removeContainerToken(org.apache.hadoop.yarn.api.records.ContainerId containerId)Remove records for a container token | 
| abstract void | removeDeletionTask(int taskId)Remove records corresponding to a deletion task | 
| abstract void | removeLocalizedResource(String user,
                       org.apache.hadoop.yarn.api.records.ApplicationId appId,
                       org.apache.hadoop.fs.Path localPath)Remove records related to a resource localization | 
| abstract void | removeLogDeleter(org.apache.hadoop.yarn.api.records.ApplicationId appId)Remove the state of a log deleter | 
| abstract void | removeNMTokenApplicationMasterKey(org.apache.hadoop.yarn.api.records.ApplicationAttemptId attempt)Remove a master key corresponding to an application | 
| void | serviceInit(org.apache.hadoop.conf.Configuration conf)Initialize the state storage | 
| void | serviceStart()Start the state storage for use | 
| void | serviceStop()Shutdown the state storage. | 
| void | setNodeStatusUpdater(NodeStatusUpdater nodeStatusUpdater) | 
| abstract void | startResourceLocalization(String user,
                         org.apache.hadoop.yarn.api.records.ApplicationId appId,
                         org.apache.hadoop.yarn.proto.YarnProtos.LocalResourceProto proto,
                         org.apache.hadoop.fs.Path localPath)Record the start of localization for a resource | 
| protected abstract void | startStorage() | 
| abstract void | storeAMRMProxyAppContextEntry(org.apache.hadoop.yarn.api.records.ApplicationAttemptId attempt,
                             String key,
                             byte[] data)Add a context entry for an application attempt in AMRMProxyService. | 
| abstract void | storeAMRMProxyCurrentMasterKey(org.apache.hadoop.yarn.server.api.records.MasterKey key)Record the current AMRMProxyTokenSecretManager master key. | 
| abstract void | storeAMRMProxyNextMasterKey(org.apache.hadoop.yarn.server.api.records.MasterKey key)Record the next AMRMProxyTokenSecretManager master key. | 
| abstract void | storeApplication(org.apache.hadoop.yarn.api.records.ApplicationId appId,
                org.apache.hadoop.yarn.proto.YarnServerNodemanagerRecoveryProtos.ContainerManagerApplicationProto p)Record the start of an application | 
| abstract void | storeAssignedResources(Container container,
                      String resourceType,
                      List<Serializable> assignedResources)Store the assigned resources to a container. | 
| abstract void | storeContainer(org.apache.hadoop.yarn.api.records.ContainerId containerId,
              int containerVersion,
              long startTime,
              org.apache.hadoop.yarn.api.protocolrecords.StartContainerRequest startRequest)Record a container start request | 
| abstract void | storeContainerCompleted(org.apache.hadoop.yarn.api.records.ContainerId containerId,
                       int exitCode)Record that a container has completed | 
| abstract void | storeContainerDiagnostics(org.apache.hadoop.yarn.api.records.ContainerId containerId,
                         StringBuilder diagnostics)Record diagnostics for a container | 
| abstract void | storeContainerKilled(org.apache.hadoop.yarn.api.records.ContainerId containerId)Record a request to kill a container | 
| abstract void | storeContainerLaunched(org.apache.hadoop.yarn.api.records.ContainerId containerId)Record that a container has been launched | 
| abstract void | storeContainerLogDir(org.apache.hadoop.yarn.api.records.ContainerId containerId,
                    String logDir)Record log directory for a container. | 
| abstract void | storeContainerPaused(org.apache.hadoop.yarn.api.records.ContainerId containerId)Record that a container has been paused at the NM. | 
| abstract void | storeContainerQueued(org.apache.hadoop.yarn.api.records.ContainerId containerId)Record that a container has been queued at the NM | 
| abstract void | storeContainerRemainingRetryAttempts(org.apache.hadoop.yarn.api.records.ContainerId containerId,
                                    int remainingRetryAttempts)Record remaining retry attempts for a container. | 
| abstract void | storeContainerRestartTimes(org.apache.hadoop.yarn.api.records.ContainerId containerId,
                          List<Long> restartTimes)Record restart times for a container. | 
| abstract void | storeContainerToken(org.apache.hadoop.yarn.api.records.ContainerId containerId,
                   Long expirationTime)Record the expiration time for a container token | 
| abstract void | storeContainerTokenCurrentMasterKey(org.apache.hadoop.yarn.server.api.records.MasterKey key)Record the current container token master key | 
| abstract void | storeContainerTokenPreviousMasterKey(org.apache.hadoop.yarn.server.api.records.MasterKey key)Record the previous container token master key | 
| abstract void | storeContainerUpdateToken(org.apache.hadoop.yarn.api.records.ContainerId containerId,
                         org.apache.hadoop.yarn.security.ContainerTokenIdentifier containerTokenIdentifier)Record that a container has been updated | 
| abstract void | storeContainerWorkDir(org.apache.hadoop.yarn.api.records.ContainerId containerId,
                     String workDir)Record working directory for a container. | 
| abstract void | storeDeletionTask(int taskId,
                 org.apache.hadoop.yarn.proto.YarnServerNodemanagerRecoveryProtos.DeletionServiceDeleteTaskProto taskProto)Record a deletion task | 
| abstract void | storeLogDeleter(org.apache.hadoop.yarn.api.records.ApplicationId appId,
               org.apache.hadoop.yarn.proto.YarnServerNodemanagerRecoveryProtos.LogDeleterProto proto)Store the state of a log deleter | 
| abstract void | storeNMTokenApplicationMasterKey(org.apache.hadoop.yarn.api.records.ApplicationAttemptId attempt,
                                org.apache.hadoop.yarn.server.api.records.MasterKey key)Record a master key corresponding to an application | 
| abstract void | storeNMTokenCurrentMasterKey(org.apache.hadoop.yarn.server.api.records.MasterKey key)Record the current NM token master key | 
| abstract void | storeNMTokenPreviousMasterKey(org.apache.hadoop.yarn.server.api.records.MasterKey key)Record the previous NM token master key | 
| protected void | updateContainerResourceMapping(Container container,
                              String resourceType,
                              List<Serializable> assignedResources) | 
close, getBlockers, getConfig, getFailureCause, getFailureState, getLifecycleHistory, getName, getServiceState, getStartTime, init, isInState, noteFailure, putBlocker, registerGlobalListener, registerServiceListener, removeBlocker, setConfig, start, stop, toString, unregisterGlobalListener, unregisterServiceListener, waitForServiceToStoppublic NMStateStoreService(String name)
protected NodeStatusUpdater getNodeStatusUpdater()
public void setNodeStatusUpdater(NodeStatusUpdater nodeStatusUpdater)
public void serviceInit(org.apache.hadoop.conf.Configuration conf)
                 throws IOException
serviceInit in class org.apache.hadoop.service.AbstractServiceIOExceptionpublic void serviceStart()
                  throws IOException
serviceStart in class org.apache.hadoop.service.AbstractServiceIOExceptionpublic void serviceStop()
                 throws IOException
serviceStop in class org.apache.hadoop.service.AbstractServiceIOExceptionpublic boolean canRecover()
public boolean isNewlyCreated()
public abstract NMStateStoreService.RecoveredApplicationsState loadApplicationsState() throws IOException
IOException - IO Exception.public abstract void storeApplication(org.apache.hadoop.yarn.api.records.ApplicationId appId,
                                      org.apache.hadoop.yarn.proto.YarnServerNodemanagerRecoveryProtos.ContainerManagerApplicationProto p)
                               throws IOException
appId - the application IDp - state to store for the applicationIOExceptionpublic abstract void removeApplication(org.apache.hadoop.yarn.api.records.ApplicationId appId)
                                throws IOException
appId - the application IDIOExceptionpublic abstract RecoveryIterator<NMStateStoreService.RecoveredContainerState> getContainerStateIterator() throws IOException
IOExceptionpublic abstract void storeContainer(org.apache.hadoop.yarn.api.records.ContainerId containerId,
                                    int containerVersion,
                                    long startTime,
                                    org.apache.hadoop.yarn.api.protocolrecords.StartContainerRequest startRequest)
                             throws IOException
containerId - the container IDcontainerVersion - the container VersionstartTime - container start timestartRequest - the container start requestIOExceptionpublic abstract void storeContainerQueued(org.apache.hadoop.yarn.api.records.ContainerId containerId)
                                   throws IOException
containerId - the container IDIOExceptionpublic abstract void storeContainerPaused(org.apache.hadoop.yarn.api.records.ContainerId containerId)
                                   throws IOException
containerId - the container ID.IOException - IO Exception.public abstract void removeContainerPaused(org.apache.hadoop.yarn.api.records.ContainerId containerId)
                                    throws IOException
containerId - the container ID.IOException - IO Exception.public abstract void storeContainerLaunched(org.apache.hadoop.yarn.api.records.ContainerId containerId)
                                     throws IOException
containerId - the container IDIOExceptionpublic abstract void storeContainerUpdateToken(org.apache.hadoop.yarn.api.records.ContainerId containerId,
                                               org.apache.hadoop.yarn.security.ContainerTokenIdentifier containerTokenIdentifier)
                                        throws IOException
containerId - the container IDcontainerTokenIdentifier - container token identifierIOExceptionpublic abstract void storeContainerCompleted(org.apache.hadoop.yarn.api.records.ContainerId containerId,
                                             int exitCode)
                                      throws IOException
containerId - the container IDexitCode - the exit code from the containerIOExceptionpublic abstract void storeContainerKilled(org.apache.hadoop.yarn.api.records.ContainerId containerId)
                                   throws IOException
containerId - the container IDIOExceptionpublic abstract void storeContainerDiagnostics(org.apache.hadoop.yarn.api.records.ContainerId containerId,
                                               StringBuilder diagnostics)
                                        throws IOException
containerId - the container IDdiagnostics - the container diagnosticsIOExceptionpublic abstract void storeContainerRemainingRetryAttempts(org.apache.hadoop.yarn.api.records.ContainerId containerId,
                                                          int remainingRetryAttempts)
                                                   throws IOException
containerId - the container IDremainingRetryAttempts - the remain retry times when container
                               fails to runIOExceptionpublic abstract void storeContainerRestartTimes(org.apache.hadoop.yarn.api.records.ContainerId containerId,
                                                List<Long> restartTimes)
                                         throws IOException
containerId - restartTimes - IOExceptionpublic abstract void storeContainerWorkDir(org.apache.hadoop.yarn.api.records.ContainerId containerId,
                                           String workDir)
                                    throws IOException
containerId - the container IDworkDir - the working directoryIOExceptionpublic abstract void storeContainerLogDir(org.apache.hadoop.yarn.api.records.ContainerId containerId,
                                          String logDir)
                                   throws IOException
containerId - the container IDlogDir - the log directoryIOExceptionpublic abstract void removeContainer(org.apache.hadoop.yarn.api.records.ContainerId containerId)
                              throws IOException
containerId - the container IDIOExceptionpublic abstract NMStateStoreService.RecoveredLocalizationState loadLocalizationState() throws IOException
IOExceptionpublic abstract void startResourceLocalization(String user, org.apache.hadoop.yarn.api.records.ApplicationId appId, org.apache.hadoop.yarn.proto.YarnProtos.LocalResourceProto proto, org.apache.hadoop.fs.Path localPath) throws IOException
user - the username or null if the resource is publicappId - the application ID if the resource is app-specific or nullproto - the resource requestlocalPath - local filesystem path where the resource will be storedIOExceptionpublic abstract void finishResourceLocalization(String user, org.apache.hadoop.yarn.api.records.ApplicationId appId, org.apache.hadoop.yarn.proto.YarnServerNodemanagerRecoveryProtos.LocalizedResourceProto proto) throws IOException
user - the username or null if the resource is publicappId - the application ID if the resource is app-specific or nullproto - the serialized localized resourceIOExceptionpublic abstract void removeLocalizedResource(String user, org.apache.hadoop.yarn.api.records.ApplicationId appId, org.apache.hadoop.fs.Path localPath) throws IOException
user - the username or null if the resource is publicappId - the application ID if the resource is app-specific or nulllocalPath - local filesystem path where the resource will be storedIOExceptionpublic abstract NMStateStoreService.RecoveredDeletionServiceState loadDeletionServiceState() throws IOException
IOExceptionpublic abstract void storeDeletionTask(int taskId,
                                       org.apache.hadoop.yarn.proto.YarnServerNodemanagerRecoveryProtos.DeletionServiceDeleteTaskProto taskProto)
                                throws IOException
taskId - the deletion task IDtaskProto - the deletion task protobufIOExceptionpublic abstract void removeDeletionTask(int taskId)
                                 throws IOException
taskId - the deletion task IDIOExceptionpublic abstract NMStateStoreService.RecoveredNMTokensState loadNMTokensState() throws IOException
IOExceptionpublic abstract void storeNMTokenCurrentMasterKey(org.apache.hadoop.yarn.server.api.records.MasterKey key)
                                           throws IOException
key - the master keyIOExceptionpublic abstract void storeNMTokenPreviousMasterKey(org.apache.hadoop.yarn.server.api.records.MasterKey key)
                                            throws IOException
key - the previous master keyIOExceptionpublic abstract void storeNMTokenApplicationMasterKey(org.apache.hadoop.yarn.api.records.ApplicationAttemptId attempt,
                                                      org.apache.hadoop.yarn.server.api.records.MasterKey key)
                                               throws IOException
attempt - the application attempt IDkey - the master keyIOExceptionpublic abstract void removeNMTokenApplicationMasterKey(org.apache.hadoop.yarn.api.records.ApplicationAttemptId attempt)
                                                throws IOException
attempt - the application attempt IDIOExceptionpublic abstract NMStateStoreService.RecoveredContainerTokensState loadContainerTokensState() throws IOException
IOExceptionpublic abstract void storeContainerTokenCurrentMasterKey(org.apache.hadoop.yarn.server.api.records.MasterKey key)
                                                  throws IOException
key - the master keyIOExceptionpublic abstract void storeContainerTokenPreviousMasterKey(org.apache.hadoop.yarn.server.api.records.MasterKey key)
                                                   throws IOException
key - the previous master keyIOExceptionpublic abstract void storeContainerToken(org.apache.hadoop.yarn.api.records.ContainerId containerId,
                                         Long expirationTime)
                                  throws IOException
containerId - the container IDexpirationTime - the container token expiration timeIOExceptionpublic abstract void removeContainerToken(org.apache.hadoop.yarn.api.records.ContainerId containerId)
                                   throws IOException
containerId - the container IDIOExceptionpublic abstract NMStateStoreService.RecoveredLogDeleterState loadLogDeleterState() throws IOException
IOExceptionpublic abstract void storeLogDeleter(org.apache.hadoop.yarn.api.records.ApplicationId appId,
                                     org.apache.hadoop.yarn.proto.YarnServerNodemanagerRecoveryProtos.LogDeleterProto proto)
                              throws IOException
appId - the application ID for the log deleterproto - the serialized state of the log deleterIOExceptionpublic abstract void removeLogDeleter(org.apache.hadoop.yarn.api.records.ApplicationId appId)
                               throws IOException
appId - the application ID for the log deleterIOExceptionpublic abstract NMStateStoreService.RecoveredAMRMProxyState loadAMRMProxyState() throws IOException
IOException - if failspublic abstract void storeAMRMProxyCurrentMasterKey(org.apache.hadoop.yarn.server.api.records.MasterKey key)
                                             throws IOException
key - the current master keyIOException - if failspublic abstract void storeAMRMProxyNextMasterKey(org.apache.hadoop.yarn.server.api.records.MasterKey key)
                                          throws IOException
key - the next master keyIOException - if failspublic abstract void storeAMRMProxyAppContextEntry(org.apache.hadoop.yarn.api.records.ApplicationAttemptId attempt,
                                                   String key,
                                                   byte[] data)
                                            throws IOException
attempt - app attempt IDkey - key stringdata - state data to storeIOException - if failspublic abstract void removeAMRMProxyAppContextEntry(org.apache.hadoop.yarn.api.records.ApplicationAttemptId attempt,
                                                    String key)
                                             throws IOException
attempt - attempt IDkey - key stringIOException - if failspublic abstract void removeAMRMProxyAppContext(org.apache.hadoop.yarn.api.records.ApplicationAttemptId attempt)
                                        throws IOException
attempt - attempt IDIOException - if failspublic abstract void storeAssignedResources(Container container, String resourceType, List<Serializable> assignedResources) throws IOException
container - NMContainerresourceType - Resource TypeassignedResources - Assigned resourcesIOException - if failsprotected abstract void initStorage(org.apache.hadoop.conf.Configuration conf)
                             throws IOException
IOExceptionprotected abstract void startStorage()
                              throws IOException
IOExceptionprotected abstract void closeStorage()
                              throws IOException
IOExceptionprotected void updateContainerResourceMapping(Container container, String resourceType, List<Serializable> assignedResources)
Copyright © 2008–2023 Apache Software Foundation. All rights reserved.