public class InJvmContainerExecutor
extends org.apache.hadoop.yarn.server.nodemanager.DefaultContainerExecutor
| Modifier and Type | Class and Description |
|---|---|
static class |
InJvmContainerExecutor.SystemExitAllowSecurityManager
An implementation of the
SecurityManager which can be used to
intercept System.exit. |
org.apache.hadoop.yarn.server.nodemanager.DefaultContainerExecutor.LocalWrapperScriptBuilderorg.apache.hadoop.yarn.server.nodemanager.ContainerExecutor.DelayedProcessKiller, org.apache.hadoop.yarn.server.nodemanager.ContainerExecutor.ExitCode, org.apache.hadoop.yarn.server.nodemanager.ContainerExecutor.Signal| Constructor and Description |
|---|
InJvmContainerExecutor()
Will construct the instance of this
ContainerExecutor and will
install a SystemExitDisallowingSecurityManager which will help with
managing the life-cycle of the containers that contain System.exit calls. |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
isContainerActive(org.apache.hadoop.yarn.api.records.ContainerId containerId)
This is to ensure that call to super.launchContainer(..) doesn't actually
execute anything other then prep work (e.g., sets up directories etc.)
|
int |
launchContainer(org.apache.hadoop.yarn.server.nodemanager.containermanager.container.Container container,
org.apache.hadoop.fs.Path nmPrivateContainerScriptPath,
org.apache.hadoop.fs.Path nmPrivateTokensPath,
String userName,
String appId,
org.apache.hadoop.fs.Path containerWorkDir,
List<String> localDirs,
List<String> logDirs)
Overrides the parent method while still invoking it.
|
buildCommandExecutor, containerIsAlive, copyFile, createDir, deleteAsUser, getLocalWrapperScriptBuilder, getWorkingDir, init, isContainerProcessAlive, killContainer, setScriptExecutable, signalContainer, startLocalizerpublic InJvmContainerExecutor()
ContainerExecutor and will
install a SystemExitDisallowingSecurityManager which will help with
managing the life-cycle of the containers that contain System.exit calls.public int launchContainer(org.apache.hadoop.yarn.server.nodemanager.containermanager.container.Container container,
org.apache.hadoop.fs.Path nmPrivateContainerScriptPath,
org.apache.hadoop.fs.Path nmPrivateTokensPath,
String userName,
String appId,
org.apache.hadoop.fs.Path containerWorkDir,
List<String> localDirs,
List<String> logDirs)
throws IOException
isContainerActive(ContainerId) method is also overridden here and
always returns 'false' the super.launchContainer(..) will only go through
the prep routine (e.g., creating temp dirs etc.) while never launching the
actual container via the launch script. This will ensure that all the
expectations of the container to be launched (e.g., symlinks etc.) are
satisfied. The actual launch will be performed by invoking
doLaunch(Container, Path) method.launchContainer in class org.apache.hadoop.yarn.server.nodemanager.DefaultContainerExecutorIOExceptionprotected boolean isContainerActive(org.apache.hadoop.yarn.api.records.ContainerId containerId)
isContainerActive in class org.apache.hadoop.yarn.server.nodemanager.ContainerExecutorCopyright © 2015. All Rights Reserved.