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 |
storeFinishedApplication(org.apache.hadoop.yarn.api.records.ApplicationId appId)
Record that an application has finished
|
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, serviceStop
close, getBlockers, getConfig, getFailureCause, getFailureState, getLifecycleHistory, getName, getServiceState, getStartTime, init, isInState, noteFailure, putBlocker, registerGlobalListener, registerServiceListener, removeBlocker, setConfig, start, stop, toString, unregisterGlobalListener, unregisterServiceListener, waitForServiceToStop
public boolean canRecover()
canRecover
in class NMStateStoreService
public NMStateStoreService.RecoveredApplicationsState loadApplicationsState() throws IOException
NMStateStoreService
loadApplicationsState
in class NMStateStoreService
IOException
public void storeApplication(org.apache.hadoop.yarn.api.records.ApplicationId appId, YarnServerNodemanagerRecoveryProtos.ContainerManagerApplicationProto p) throws IOException
NMStateStoreService
storeApplication
in class NMStateStoreService
appId
- the application IDp
- state to store for the applicationIOException
public void storeFinishedApplication(org.apache.hadoop.yarn.api.records.ApplicationId appId)
NMStateStoreService
storeFinishedApplication
in class NMStateStoreService
appId
- the application IDpublic void removeApplication(org.apache.hadoop.yarn.api.records.ApplicationId appId) throws IOException
NMStateStoreService
removeApplication
in class NMStateStoreService
appId
- the application IDIOException
public List<NMStateStoreService.RecoveredContainerState> loadContainersState() throws IOException
NMStateStoreService
loadContainersState
in class NMStateStoreService
IOException
public void storeContainer(org.apache.hadoop.yarn.api.records.ContainerId containerId, org.apache.hadoop.yarn.api.protocolrecords.StartContainerRequest startRequest) throws IOException
NMStateStoreService
storeContainer
in class NMStateStoreService
containerId
- the container IDstartRequest
- the container start requestIOException
public void storeContainerDiagnostics(org.apache.hadoop.yarn.api.records.ContainerId containerId, StringBuilder diagnostics) throws IOException
NMStateStoreService
storeContainerDiagnostics
in class NMStateStoreService
containerId
- the container IDdiagnostics
- the container diagnosticsIOException
public void storeContainerLaunched(org.apache.hadoop.yarn.api.records.ContainerId containerId) throws IOException
NMStateStoreService
storeContainerLaunched
in class NMStateStoreService
containerId
- the container IDIOException
public void storeContainerKilled(org.apache.hadoop.yarn.api.records.ContainerId containerId) throws IOException
NMStateStoreService
storeContainerKilled
in class NMStateStoreService
containerId
- the container IDIOException
public void storeContainerCompleted(org.apache.hadoop.yarn.api.records.ContainerId containerId, int exitCode) throws IOException
NMStateStoreService
storeContainerCompleted
in class NMStateStoreService
containerId
- the container IDexitCode
- the exit code from the containerIOException
public void removeContainer(org.apache.hadoop.yarn.api.records.ContainerId containerId) throws IOException
NMStateStoreService
removeContainer
in class NMStateStoreService
containerId
- the container IDIOException
public NMStateStoreService.RecoveredLocalizationState loadLocalizationState() throws IOException
NMStateStoreService
loadLocalizationState
in class NMStateStoreService
IOException
public 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
NMStateStoreService
startResourceLocalization
in class NMStateStoreService
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 storedIOException
public void finishResourceLocalization(String user, org.apache.hadoop.yarn.api.records.ApplicationId appId, YarnServerNodemanagerRecoveryProtos.LocalizedResourceProto proto) throws IOException
NMStateStoreService
finishResourceLocalization
in class NMStateStoreService
user
- the username or null if the resource is publicappId
- the application ID if the resource is app-specific or nullproto
- the serialized localized resourceIOException
public void removeLocalizedResource(String user, org.apache.hadoop.yarn.api.records.ApplicationId appId, org.apache.hadoop.fs.Path localPath) throws IOException
NMStateStoreService
removeLocalizedResource
in class NMStateStoreService
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 storedIOException
public NMStateStoreService.RecoveredDeletionServiceState loadDeletionServiceState() throws IOException
NMStateStoreService
loadDeletionServiceState
in class NMStateStoreService
IOException
public void storeDeletionTask(int taskId, YarnServerNodemanagerRecoveryProtos.DeletionServiceDeleteTaskProto taskProto) throws IOException
NMStateStoreService
storeDeletionTask
in class NMStateStoreService
taskId
- the deletion task IDtaskProto
- the deletion task protobufIOException
public void removeDeletionTask(int taskId) throws IOException
NMStateStoreService
removeDeletionTask
in class NMStateStoreService
taskId
- the deletion task IDIOException
public NMStateStoreService.RecoveredNMTokensState loadNMTokensState() throws IOException
NMStateStoreService
loadNMTokensState
in class NMStateStoreService
IOException
public void storeNMTokenCurrentMasterKey(org.apache.hadoop.yarn.server.api.records.MasterKey key) throws IOException
NMStateStoreService
storeNMTokenCurrentMasterKey
in class NMStateStoreService
key
- the master keyIOException
public void storeNMTokenPreviousMasterKey(org.apache.hadoop.yarn.server.api.records.MasterKey key) throws IOException
NMStateStoreService
storeNMTokenPreviousMasterKey
in class NMStateStoreService
key
- the previous master keyIOException
public void storeNMTokenApplicationMasterKey(org.apache.hadoop.yarn.api.records.ApplicationAttemptId attempt, org.apache.hadoop.yarn.server.api.records.MasterKey key) throws IOException
NMStateStoreService
storeNMTokenApplicationMasterKey
in class NMStateStoreService
attempt
- the application attempt IDkey
- the master keyIOException
public void removeNMTokenApplicationMasterKey(org.apache.hadoop.yarn.api.records.ApplicationAttemptId attempt) throws IOException
NMStateStoreService
removeNMTokenApplicationMasterKey
in class NMStateStoreService
attempt
- the application attempt IDIOException
public NMStateStoreService.RecoveredContainerTokensState loadContainerTokensState() throws IOException
NMStateStoreService
loadContainerTokensState
in class NMStateStoreService
IOException
public void storeContainerTokenCurrentMasterKey(org.apache.hadoop.yarn.server.api.records.MasterKey key) throws IOException
NMStateStoreService
storeContainerTokenCurrentMasterKey
in class NMStateStoreService
key
- the master keyIOException
public void storeContainerTokenPreviousMasterKey(org.apache.hadoop.yarn.server.api.records.MasterKey key) throws IOException
NMStateStoreService
storeContainerTokenPreviousMasterKey
in class NMStateStoreService
key
- the previous master keyIOException
public void storeContainerToken(org.apache.hadoop.yarn.api.records.ContainerId containerId, Long expirationTime) throws IOException
NMStateStoreService
storeContainerToken
in class NMStateStoreService
containerId
- the container IDexpirationTime
- the container token expiration timeIOException
public void removeContainerToken(org.apache.hadoop.yarn.api.records.ContainerId containerId) throws IOException
NMStateStoreService
removeContainerToken
in class NMStateStoreService
containerId
- the container IDIOException
public NMStateStoreService.RecoveredLogDeleterState loadLogDeleterState() throws IOException
NMStateStoreService
loadLogDeleterState
in class NMStateStoreService
IOException
public void storeLogDeleter(org.apache.hadoop.yarn.api.records.ApplicationId appId, YarnServerNodemanagerRecoveryProtos.LogDeleterProto proto) throws IOException
NMStateStoreService
storeLogDeleter
in class NMStateStoreService
appId
- the application ID for the log deleterproto
- the serialized state of the log deleterIOException
public void removeLogDeleter(org.apache.hadoop.yarn.api.records.ApplicationId appId) throws IOException
NMStateStoreService
removeLogDeleter
in class NMStateStoreService
appId
- the application ID for the log deleterIOException
protected void initStorage(org.apache.hadoop.conf.Configuration conf) throws IOException
initStorage
in class NMStateStoreService
IOException
protected void startStorage() throws IOException
startStorage
in class NMStateStoreService
IOException
protected void closeStorage() throws IOException
closeStorage
in class NMStateStoreService
IOException
Copyright © 2017 Apache Software Foundation. All Rights Reserved.