|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hadoop.yarn.server.nodemanager.ContainerExecutor
public abstract class ContainerExecutor
| Nested Class Summary | |
|---|---|
static class |
ContainerExecutor.DelayedProcessKiller
|
static class |
ContainerExecutor.ExitCode
|
static class |
ContainerExecutor.Signal
The constants for the signals. |
| Field Summary | |
|---|---|
static boolean |
isSetsidAvailable
|
static org.apache.hadoop.fs.permission.FsPermission |
TASK_LAUNCH_SCRIPT_PERMISSION
|
| Constructor Summary | |
|---|---|
ContainerExecutor()
|
|
| Method Summary | |
|---|---|
void |
activateContainer(org.apache.hadoop.yarn.api.records.ContainerId containerId,
org.apache.hadoop.fs.Path pidFilePath)
Mark the container as active |
void |
deactivateContainer(org.apache.hadoop.yarn.api.records.ContainerId containerId)
Mark the container as inactive. |
abstract void |
deleteAsUser(String user,
org.apache.hadoop.fs.Path subDir,
org.apache.hadoop.fs.Path... basedirs)
|
org.apache.hadoop.conf.Configuration |
getConf()
|
protected org.apache.hadoop.fs.Path |
getPidFilePath(org.apache.hadoop.yarn.api.records.ContainerId containerId)
Get the pidFile of the container. |
String |
getProcessId(org.apache.hadoop.yarn.api.records.ContainerId containerID)
Get the process-identifier for the container |
abstract void |
init()
Run the executor initialization steps. |
protected boolean |
isContainerActive(org.apache.hadoop.yarn.api.records.ContainerId containerId)
Is the container still active? |
abstract int |
launchContainer(Container container,
org.apache.hadoop.fs.Path nmPrivateContainerScriptPath,
org.apache.hadoop.fs.Path nmPrivateTokensPath,
String user,
String appId,
org.apache.hadoop.fs.Path containerWorkDir,
List<String> localDirs,
List<String> logDirs)
Launch the container on the node. |
protected void |
logOutput(String output)
|
void |
setConf(org.apache.hadoop.conf.Configuration conf)
|
abstract boolean |
signalContainer(String user,
String pid,
ContainerExecutor.Signal signal)
|
abstract void |
startLocalizer(org.apache.hadoop.fs.Path nmPrivateContainerTokens,
InetSocketAddress nmAddr,
String user,
String appId,
String locId,
List<String> localDirs,
List<String> logDirs)
Prepare the environment for containers in this application to execute. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final org.apache.hadoop.fs.permission.FsPermission TASK_LAUNCH_SCRIPT_PERMISSION
public static final boolean isSetsidAvailable
| Constructor Detail |
|---|
public ContainerExecutor()
| Method Detail |
|---|
public void setConf(org.apache.hadoop.conf.Configuration conf)
setConf in interface org.apache.hadoop.conf.Configurablepublic org.apache.hadoop.conf.Configuration getConf()
getConf in interface org.apache.hadoop.conf.Configurable
public abstract void init()
throws IOException
IOException
public abstract void startLocalizer(org.apache.hadoop.fs.Path nmPrivateContainerTokens,
InetSocketAddress nmAddr,
String user,
String appId,
String locId,
List<String> localDirs,
List<String> logDirs)
throws IOException,
InterruptedException
user - user name of application ownerappId - id of the applicationnmPrivateContainerTokens - path to localized credentials, rsrc by NMnmAddr - RPC address to contact NMlocalDirs - nm-local-dirslogDirs - nm-log-dirs
IOException - For most application init failures
InterruptedException - If application init thread is halted by NM
public abstract int launchContainer(Container container,
org.apache.hadoop.fs.Path nmPrivateContainerScriptPath,
org.apache.hadoop.fs.Path nmPrivateTokensPath,
String user,
String appId,
org.apache.hadoop.fs.Path containerWorkDir,
List<String> localDirs,
List<String> logDirs)
throws IOException
container - the container to be launchednmPrivateContainerScriptPath - the path for launch scriptnmPrivateTokensPath - the path for tokens for the containeruser - the user of the containerappId - the appId of the containercontainerWorkDir - the work dir for the containerlocalDirs - nm-local-dirs to be used for this containerlogDirs - nm-log-dirs to be used for this container
IOException
public abstract boolean signalContainer(String user,
String pid,
ContainerExecutor.Signal signal)
throws IOException
IOException
public abstract void deleteAsUser(String user,
org.apache.hadoop.fs.Path subDir,
org.apache.hadoop.fs.Path... basedirs)
throws IOException,
InterruptedException
IOException
InterruptedExceptionprotected void logOutput(String output)
protected org.apache.hadoop.fs.Path getPidFilePath(org.apache.hadoop.yarn.api.records.ContainerId containerId)
containerId -
protected boolean isContainerActive(org.apache.hadoop.yarn.api.records.ContainerId containerId)
containerId -
public void activateContainer(org.apache.hadoop.yarn.api.records.ContainerId containerId,
org.apache.hadoop.fs.Path pidFilePath)
containerId - the ContainerIdpidFilePath - Path where the executor should write the pid of the launched
processpublic void deactivateContainer(org.apache.hadoop.yarn.api.records.ContainerId containerId)
public String getProcessId(org.apache.hadoop.yarn.api.records.ContainerId containerID)
containerID -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||