org.apache.hadoop.yarn.server.nodemanager.containermanager.launcher
Class ContainerLaunch

java.lang.Object
  extended by org.apache.hadoop.yarn.server.nodemanager.containermanager.launcher.ContainerLaunch
All Implemented Interfaces:
Callable<Integer>

public class ContainerLaunch
extends Object
implements Callable<Integer>


Field Summary
static String CONTAINER_SCRIPT
           
static String FINAL_CONTAINER_TOKENS_FILE
           
 
Constructor Summary
ContainerLaunch(org.apache.hadoop.conf.Configuration configuration, org.apache.hadoop.yarn.event.Dispatcher dispatcher, ContainerExecutor exec, Application app, Container container, LocalDirsHandlerService dirsHandler)
           
 
Method Summary
 Integer call()
           
 void cleanupContainer()
          Cleanup the container.
static String getRelativeContainerLogDir(String appIdStr, String containerIdStr)
           
 void sanitizeEnv(Map<String,String> environment, org.apache.hadoop.fs.Path pwd, List<org.apache.hadoop.fs.Path> appDirs)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONTAINER_SCRIPT

public static final String CONTAINER_SCRIPT
See Also:
Constant Field Values

FINAL_CONTAINER_TOKENS_FILE

public static final String FINAL_CONTAINER_TOKENS_FILE
See Also:
Constant Field Values
Constructor Detail

ContainerLaunch

public ContainerLaunch(org.apache.hadoop.conf.Configuration configuration,
                       org.apache.hadoop.yarn.event.Dispatcher dispatcher,
                       ContainerExecutor exec,
                       Application app,
                       Container container,
                       LocalDirsHandlerService dirsHandler)
Method Detail

call

public Integer call()
Specified by:
call in interface Callable<Integer>

cleanupContainer

public void cleanupContainer()
                      throws IOException
Cleanup the container. Cancels the launch if launch has not started yet or signals the executor to not execute the process if not already done so. Also, sends a SIGTERM followed by a SIGKILL to the process if the process id is available.

Throws:
IOException

getRelativeContainerLogDir

public static String getRelativeContainerLogDir(String appIdStr,
                                                String containerIdStr)

sanitizeEnv

public void sanitizeEnv(Map<String,String> environment,
                        org.apache.hadoop.fs.Path pwd,
                        List<org.apache.hadoop.fs.Path> appDirs)


Copyright © 2012 Apache Software Foundation. All Rights Reserved.