@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.RecoveredApplicationsState |
static class |
NMStateStoreService.RecoveredContainerState |
static class |
NMStateStoreService.RecoveredContainerStatus |
static class |
NMStateStoreService.RecoveredContainerTokensState |
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,
YarnServerNodemanagerRecoveryProtos.LocalizedResourceProto proto)
Record the completion of a resource localization
|
protected abstract void |
initStorage(org.apache.hadoop.conf.Configuration conf) |
boolean |
isNewlyCreated() |
abstract NMStateStoreService.RecoveredApplicationsState |
loadApplicationsState()
Load the state of applications
|
abstract List<NMStateStoreService.RecoveredContainerState> |
loadContainersState()
Load the state of containers
|
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 |
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 |
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.
|
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 |
storeApplication(org.apache.hadoop.yarn.api.records.ApplicationId appId,
YarnServerNodemanagerRecoveryProtos.ContainerManagerApplicationProto p)
Record the start of an application
|
abstract void |
storeContainer(org.apache.hadoop.yarn.api.records.ContainerId containerId,
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 |
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 |
storeDeletionTask(int taskId,
YarnServerNodemanagerRecoveryProtos.DeletionServiceDeleteTaskProto taskProto)
Record a deletion task
|
abstract void |
storeLogDeleter(org.apache.hadoop.yarn.api.records.ApplicationId appId,
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
|
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)
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
IOExceptionpublic abstract void storeApplication(org.apache.hadoop.yarn.api.records.ApplicationId appId,
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 List<NMStateStoreService.RecoveredContainerState> loadContainersState() throws IOException
IOExceptionpublic abstract void storeContainer(org.apache.hadoop.yarn.api.records.ContainerId containerId,
org.apache.hadoop.yarn.api.protocolrecords.StartContainerRequest startRequest)
throws IOException
containerId - the container IDstartRequest - the container start requestIOExceptionpublic abstract void storeContainerLaunched(org.apache.hadoop.yarn.api.records.ContainerId containerId)
throws IOException
containerId - the container IDIOExceptionpublic 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 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, 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,
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,
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 deleterIOExceptionprotected abstract void initStorage(org.apache.hadoop.conf.Configuration conf)
throws IOException
IOExceptionprotected abstract void startStorage()
throws IOException
IOExceptionprotected abstract void closeStorage()
throws IOException
IOExceptionCopyright © 2016 Apache Software Foundation. All Rights Reserved.