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(Context context, org.apache.hadoop.conf.Configuration configuration, org.apache.hadoop.yarn.event.Dispatcher dispatcher, ContainerExecutor exec, Application app, Container container, LocalDirsHandlerService dirsHandler, ContainerManagerImpl containerManager)
           
 
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, List<String> containerLogDirs, Map<org.apache.hadoop.fs.Path,List<String>> resources)
           
 
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

FINAL_CONTAINER_TOKENS_FILE

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

ContainerLaunch

public ContainerLaunch(Context context,
                       org.apache.hadoop.conf.Configuration configuration,
                       org.apache.hadoop.yarn.event.Dispatcher dispatcher,
                       ContainerExecutor exec,
                       Application app,
                       Container container,
                       LocalDirsHandlerService dirsHandler,
                       ContainerManagerImpl containerManager)
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,
                        List<String> containerLogDirs,
                        Map<org.apache.hadoop.fs.Path,List<String>> resources)
                 throws IOException
Throws:
IOException


Copyright © 2014 Apache Software Foundation. All Rights Reserved.