public class DefaultContainerExecutor extends ContainerExecutor
ContainerExecutor.DelayedProcessKiller, ContainerExecutor.ExitCode, ContainerExecutor.SignalTASK_LAUNCH_SCRIPT_PERMISSION| Constructor and Description |
|---|
DefaultContainerExecutor() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
containerIsAlive(String pid)
Returns true if the process with the specified pid is alive.
|
void |
deleteAsUser(String user,
org.apache.hadoop.fs.Path subDir,
org.apache.hadoop.fs.Path... baseDirs) |
void |
init()
Run the executor initialization steps.
|
int |
launchContainer(Container container,
org.apache.hadoop.fs.Path nmPrivateContainerScriptPath,
org.apache.hadoop.fs.Path nmPrivateTokensPath,
org.apache.hadoop.fs.Path nmPrivateExtTokensPath,
String extTokensEnvVar,
String userName,
String appId,
org.apache.hadoop.fs.Path containerWorkDir,
List<String> localDirs,
List<String> logDirs)
Launch the container on the node.
|
boolean |
signalContainer(String user,
String pid,
ContainerExecutor.Signal signal) |
void |
startLocalizer(org.apache.hadoop.fs.Path nmPrivateContainerTokensPath,
org.apache.hadoop.fs.Path nmPrivateExtTokensPath,
String extTokensEnvVar,
InetSocketAddress nmAddr,
String user,
String appId,
String locId,
List<String> localDirs,
List<String> logDirs)
Prepare the environment for containers in this application to execute.
|
activateContainer, deactivateContainer, getConf, getPidFilePath, getProcessId, getRunCommand, isContainerActive, logOutput, setConfpublic void init()
throws IOException
ContainerExecutorinit in class ContainerExecutorIOExceptionpublic void startLocalizer(org.apache.hadoop.fs.Path nmPrivateContainerTokensPath,
org.apache.hadoop.fs.Path nmPrivateExtTokensPath,
String extTokensEnvVar,
InetSocketAddress nmAddr,
String user,
String appId,
String locId,
List<String> localDirs,
List<String> logDirs)
throws IOException,
InterruptedException
ContainerExecutorstartLocalizer in class ContainerExecutornmPrivateContainerTokensPath - path to localized credentials, rsrc by NMnmPrivateExtTokensPath - the path for any external tokens for the container - nullableextTokensEnvVar - the name of the environment variable that points to external token path - nullablenmAddr - RPC address to contact NMuser - user name of application ownerappId - id of the applicationlocalDirs - nm-local-dirslogDirs - nm-log-dirsIOException - For most application init failuresInterruptedException - If application init thread is halted by NMpublic int launchContainer(Container container, org.apache.hadoop.fs.Path nmPrivateContainerScriptPath, org.apache.hadoop.fs.Path nmPrivateTokensPath, org.apache.hadoop.fs.Path nmPrivateExtTokensPath, String extTokensEnvVar, String userName, String appId, org.apache.hadoop.fs.Path containerWorkDir, List<String> localDirs, List<String> logDirs) throws IOException
ContainerExecutorlaunchContainer in class ContainerExecutorcontainer - the container to be launchednmPrivateContainerScriptPath - the path for launch scriptnmPrivateTokensPath - the path for tokens for the containernmPrivateExtTokensPath - the path for any external tokens for the container - nullableextTokensEnvVar - the name of the environment variable that points to external token path - nullableuserName - 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 containerIOExceptionpublic boolean signalContainer(String user, String pid, ContainerExecutor.Signal signal) throws IOException
signalContainer in class ContainerExecutorIOExceptionpublic static boolean containerIsAlive(String pid) throws IOException
pid - String pidIOExceptionpublic void deleteAsUser(String user, org.apache.hadoop.fs.Path subDir, org.apache.hadoop.fs.Path... baseDirs) throws IOException, InterruptedException
deleteAsUser in class ContainerExecutorIOExceptionInterruptedExceptionCopyright © 2014 Apache Software Foundation. All Rights Reserved.