public class NMNullStateStoreService extends NMStateStoreService
NMStateStoreService.LocalResourceTrackerState, NMStateStoreService.RecoveredApplicationsState, NMStateStoreService.RecoveredContainerState, NMStateStoreService.RecoveredContainerStatus, NMStateStoreService.RecoveredContainerTokensState, NMStateStoreService.RecoveredDeletionServiceState, NMStateStoreService.RecoveredLocalizationState, NMStateStoreService.RecoveredLogDeleterState, NMStateStoreService.RecoveredNMTokensState, NMStateStoreService.RecoveredUserResources| Constructor and Description |
|---|
NMNullStateStoreService() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canRecover() |
protected void |
closeStorage() |
void |
finishResourceLocalization(String user,
org.apache.hadoop.yarn.api.records.ApplicationId appId,
YarnServerNodemanagerRecoveryProtos.LocalizedResourceProto proto)
Record the completion of a resource localization
|
protected void |
initStorage(org.apache.hadoop.conf.Configuration conf) |
NMStateStoreService.RecoveredApplicationsState |
loadApplicationsState()
Load the state of applications
|
List<NMStateStoreService.RecoveredContainerState> |
loadContainersState()
Load the state of containers
|
NMStateStoreService.RecoveredContainerTokensState |
loadContainerTokensState()
Load the state of container tokens
|
NMStateStoreService.RecoveredDeletionServiceState |
loadDeletionServiceState()
Load the state of the deletion service
|
NMStateStoreService.RecoveredLocalizationState |
loadLocalizationState()
Load the state of localized resources
|
NMStateStoreService.RecoveredLogDeleterState |
loadLogDeleterState()
Load the state of log deleters
|
NMStateStoreService.RecoveredNMTokensState |
loadNMTokensState()
Load the state of NM tokens
|
void |
removeApplication(org.apache.hadoop.yarn.api.records.ApplicationId appId)
Remove records corresponding to an application
|
void |
removeContainer(org.apache.hadoop.yarn.api.records.ContainerId containerId)
Remove records corresponding to a container
|
void |
removeContainerToken(org.apache.hadoop.yarn.api.records.ContainerId containerId)
Remove records for a container token
|
void |
removeDeletionTask(int taskId)
Remove records corresponding to a deletion task
|
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
|
void |
removeLogDeleter(org.apache.hadoop.yarn.api.records.ApplicationId appId)
Remove the state of a log deleter
|
void |
removeNMTokenApplicationMasterKey(org.apache.hadoop.yarn.api.records.ApplicationAttemptId attempt)
Remove a master key corresponding to an application
|
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 void |
startStorage() |
void |
storeApplication(org.apache.hadoop.yarn.api.records.ApplicationId appId,
YarnServerNodemanagerRecoveryProtos.ContainerManagerApplicationProto p)
Record the start of an application
|
void |
storeContainer(org.apache.hadoop.yarn.api.records.ContainerId containerId,
org.apache.hadoop.yarn.api.protocolrecords.StartContainerRequest startRequest)
Record a container start request
|
void |
storeContainerCompleted(org.apache.hadoop.yarn.api.records.ContainerId containerId,
int exitCode)
Record that a container has completed
|
void |
storeContainerDiagnostics(org.apache.hadoop.yarn.api.records.ContainerId containerId,
StringBuilder diagnostics)
Record diagnostics for a container
|
void |
storeContainerKilled(org.apache.hadoop.yarn.api.records.ContainerId containerId)
Record a request to kill a container
|
void |
storeContainerLaunched(org.apache.hadoop.yarn.api.records.ContainerId containerId)
Record that a container has been launched
|
void |
storeContainerToken(org.apache.hadoop.yarn.api.records.ContainerId containerId,
Long expirationTime)
Record the expiration time for a container token
|
void |
storeContainerTokenCurrentMasterKey(org.apache.hadoop.yarn.server.api.records.MasterKey key)
Record the current container token master key
|
void |
storeContainerTokenPreviousMasterKey(org.apache.hadoop.yarn.server.api.records.MasterKey key)
Record the previous container token master key
|
void |
storeDeletionTask(int taskId,
YarnServerNodemanagerRecoveryProtos.DeletionServiceDeleteTaskProto taskProto)
Record a deletion task
|
void |
storeLogDeleter(org.apache.hadoop.yarn.api.records.ApplicationId appId,
YarnServerNodemanagerRecoveryProtos.LogDeleterProto proto)
Store the state of a log deleter
|
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
|
void |
storeNMTokenCurrentMasterKey(org.apache.hadoop.yarn.server.api.records.MasterKey key)
Record the current NM token master key
|
void |
storeNMTokenPreviousMasterKey(org.apache.hadoop.yarn.server.api.records.MasterKey key)
Record the previous NM token master key
|
isNewlyCreated, serviceInit, serviceStart, serviceStopclose, getBlockers, getConfig, getFailureCause, getFailureState, getLifecycleHistory, getName, getServiceState, getStartTime, init, isInState, noteFailure, putBlocker, registerGlobalListener, registerServiceListener, removeBlocker, setConfig, start, stop, toString, unregisterGlobalListener, unregisterServiceListener, waitForServiceToStoppublic boolean canRecover()
canRecover in class NMStateStoreServicepublic NMStateStoreService.RecoveredApplicationsState loadApplicationsState() throws IOException
NMStateStoreServiceloadApplicationsState in class NMStateStoreServiceIOExceptionpublic void storeApplication(org.apache.hadoop.yarn.api.records.ApplicationId appId,
YarnServerNodemanagerRecoveryProtos.ContainerManagerApplicationProto p)
throws IOException
NMStateStoreServicestoreApplication in class NMStateStoreServiceappId - the application IDp - state to store for the applicationIOExceptionpublic void removeApplication(org.apache.hadoop.yarn.api.records.ApplicationId appId)
throws IOException
NMStateStoreServiceremoveApplication in class NMStateStoreServiceappId - the application IDIOExceptionpublic List<NMStateStoreService.RecoveredContainerState> loadContainersState() throws IOException
NMStateStoreServiceloadContainersState in class NMStateStoreServiceIOExceptionpublic void storeContainer(org.apache.hadoop.yarn.api.records.ContainerId containerId,
org.apache.hadoop.yarn.api.protocolrecords.StartContainerRequest startRequest)
throws IOException
NMStateStoreServicestoreContainer in class NMStateStoreServicecontainerId - the container IDstartRequest - the container start requestIOExceptionpublic void storeContainerDiagnostics(org.apache.hadoop.yarn.api.records.ContainerId containerId,
StringBuilder diagnostics)
throws IOException
NMStateStoreServicestoreContainerDiagnostics in class NMStateStoreServicecontainerId - the container IDdiagnostics - the container diagnosticsIOExceptionpublic void storeContainerLaunched(org.apache.hadoop.yarn.api.records.ContainerId containerId)
throws IOException
NMStateStoreServicestoreContainerLaunched in class NMStateStoreServicecontainerId - the container IDIOExceptionpublic void storeContainerKilled(org.apache.hadoop.yarn.api.records.ContainerId containerId)
throws IOException
NMStateStoreServicestoreContainerKilled in class NMStateStoreServicecontainerId - the container IDIOExceptionpublic void storeContainerCompleted(org.apache.hadoop.yarn.api.records.ContainerId containerId,
int exitCode)
throws IOException
NMStateStoreServicestoreContainerCompleted in class NMStateStoreServicecontainerId - the container IDexitCode - the exit code from the containerIOExceptionpublic void removeContainer(org.apache.hadoop.yarn.api.records.ContainerId containerId)
throws IOException
NMStateStoreServiceremoveContainer in class NMStateStoreServicecontainerId - the container IDIOExceptionpublic NMStateStoreService.RecoveredLocalizationState loadLocalizationState() throws IOException
NMStateStoreServiceloadLocalizationState in class NMStateStoreServiceIOExceptionpublic 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
NMStateStoreServicestartResourceLocalization in class NMStateStoreServiceuser - 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 void finishResourceLocalization(String user, org.apache.hadoop.yarn.api.records.ApplicationId appId, YarnServerNodemanagerRecoveryProtos.LocalizedResourceProto proto) throws IOException
NMStateStoreServicefinishResourceLocalization in class NMStateStoreServiceuser - the username or null if the resource is publicappId - the application ID if the resource is app-specific or nullproto - the serialized localized resourceIOExceptionpublic void removeLocalizedResource(String user, org.apache.hadoop.yarn.api.records.ApplicationId appId, org.apache.hadoop.fs.Path localPath) throws IOException
NMStateStoreServiceremoveLocalizedResource in class NMStateStoreServiceuser - 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 NMStateStoreService.RecoveredDeletionServiceState loadDeletionServiceState() throws IOException
NMStateStoreServiceloadDeletionServiceState in class NMStateStoreServiceIOExceptionpublic void storeDeletionTask(int taskId,
YarnServerNodemanagerRecoveryProtos.DeletionServiceDeleteTaskProto taskProto)
throws IOException
NMStateStoreServicestoreDeletionTask in class NMStateStoreServicetaskId - the deletion task IDtaskProto - the deletion task protobufIOExceptionpublic void removeDeletionTask(int taskId)
throws IOException
NMStateStoreServiceremoveDeletionTask in class NMStateStoreServicetaskId - the deletion task IDIOExceptionpublic NMStateStoreService.RecoveredNMTokensState loadNMTokensState() throws IOException
NMStateStoreServiceloadNMTokensState in class NMStateStoreServiceIOExceptionpublic void storeNMTokenCurrentMasterKey(org.apache.hadoop.yarn.server.api.records.MasterKey key)
throws IOException
NMStateStoreServicestoreNMTokenCurrentMasterKey in class NMStateStoreServicekey - the master keyIOExceptionpublic void storeNMTokenPreviousMasterKey(org.apache.hadoop.yarn.server.api.records.MasterKey key)
throws IOException
NMStateStoreServicestoreNMTokenPreviousMasterKey in class NMStateStoreServicekey - the previous master keyIOExceptionpublic void storeNMTokenApplicationMasterKey(org.apache.hadoop.yarn.api.records.ApplicationAttemptId attempt,
org.apache.hadoop.yarn.server.api.records.MasterKey key)
throws IOException
NMStateStoreServicestoreNMTokenApplicationMasterKey in class NMStateStoreServiceattempt - the application attempt IDkey - the master keyIOExceptionpublic void removeNMTokenApplicationMasterKey(org.apache.hadoop.yarn.api.records.ApplicationAttemptId attempt)
throws IOException
NMStateStoreServiceremoveNMTokenApplicationMasterKey in class NMStateStoreServiceattempt - the application attempt IDIOExceptionpublic NMStateStoreService.RecoveredContainerTokensState loadContainerTokensState() throws IOException
NMStateStoreServiceloadContainerTokensState in class NMStateStoreServiceIOExceptionpublic void storeContainerTokenCurrentMasterKey(org.apache.hadoop.yarn.server.api.records.MasterKey key)
throws IOException
NMStateStoreServicestoreContainerTokenCurrentMasterKey in class NMStateStoreServicekey - the master keyIOExceptionpublic void storeContainerTokenPreviousMasterKey(org.apache.hadoop.yarn.server.api.records.MasterKey key)
throws IOException
NMStateStoreServicestoreContainerTokenPreviousMasterKey in class NMStateStoreServicekey - the previous master keyIOExceptionpublic void storeContainerToken(org.apache.hadoop.yarn.api.records.ContainerId containerId,
Long expirationTime)
throws IOException
NMStateStoreServicestoreContainerToken in class NMStateStoreServicecontainerId - the container IDexpirationTime - the container token expiration timeIOExceptionpublic void removeContainerToken(org.apache.hadoop.yarn.api.records.ContainerId containerId)
throws IOException
NMStateStoreServiceremoveContainerToken in class NMStateStoreServicecontainerId - the container IDIOExceptionpublic NMStateStoreService.RecoveredLogDeleterState loadLogDeleterState() throws IOException
NMStateStoreServiceloadLogDeleterState in class NMStateStoreServiceIOExceptionpublic void storeLogDeleter(org.apache.hadoop.yarn.api.records.ApplicationId appId,
YarnServerNodemanagerRecoveryProtos.LogDeleterProto proto)
throws IOException
NMStateStoreServicestoreLogDeleter in class NMStateStoreServiceappId - the application ID for the log deleterproto - the serialized state of the log deleterIOExceptionpublic void removeLogDeleter(org.apache.hadoop.yarn.api.records.ApplicationId appId)
throws IOException
NMStateStoreServiceremoveLogDeleter in class NMStateStoreServiceappId - the application ID for the log deleterIOExceptionprotected void initStorage(org.apache.hadoop.conf.Configuration conf)
throws IOException
initStorage in class NMStateStoreServiceIOExceptionprotected void startStorage()
throws IOException
startStorage in class NMStateStoreServiceIOExceptionprotected void closeStorage()
throws IOException
closeStorage in class NMStateStoreServiceIOExceptionCopyright © 2016 Apache Software Foundation. All Rights Reserved.