@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, waitForServiceToStop
public NMStateStoreService(String name)
public void serviceInit(org.apache.hadoop.conf.Configuration conf) throws IOException
serviceInit
in class org.apache.hadoop.service.AbstractService
IOException
public void serviceStart() throws IOException
serviceStart
in class org.apache.hadoop.service.AbstractService
IOException
public void serviceStop() throws IOException
serviceStop
in class org.apache.hadoop.service.AbstractService
IOException
public boolean canRecover()
public abstract NMStateStoreService.RecoveredLocalizationState loadLocalizationState() throws IOException
IOException
public 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 storedIOException
public 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 resourceIOException
public 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 storedIOException
public abstract NMStateStoreService.RecoveredDeletionServiceState loadDeletionServiceState() throws IOException
IOException
public abstract void storeDeletionTask(int taskId, YarnServerNodemanagerRecoveryProtos.DeletionServiceDeleteTaskProto taskProto) throws IOException
IOException
public abstract void removeDeletionTask(int taskId) throws IOException
IOException
protected abstract void initStorage(org.apache.hadoop.conf.Configuration conf) throws IOException
IOException
protected abstract void startStorage() throws IOException
IOException
protected abstract void closeStorage() throws IOException
IOException
Copyright © 2015 Apache Software Foundation. All Rights Reserved.