@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.RecoveredDeletionServiceState |
static class |
NMStateStoreService.RecoveredLocalizationState |
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) |
abstract NMStateStoreService.RecoveredDeletionServiceState |
loadDeletionServiceState() |
abstract NMStateStoreService.RecoveredLocalizationState |
loadLocalizationState()
Load the state of localized resources
|
abstract void |
removeDeletionTask(int taskId) |
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
|
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 |
storeDeletionTask(int taskId,
YarnServerNodemanagerRecoveryProtos.DeletionServiceDeleteTaskProto taskProto) |
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 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
IOExceptionpublic abstract void removeDeletionTask(int taskId)
throws IOException
IOExceptionprotected abstract void initStorage(org.apache.hadoop.conf.Configuration conf)
throws IOException
IOExceptionprotected abstract void startStorage()
throws IOException
IOExceptionprotected abstract void closeStorage()
throws IOException
IOExceptionCopyright © 2014 Apache Software Foundation. All Rights Reserved.