DockerContainerExecutor class has several
limitations, not the least of which is that if used, all containers
are launched in Docker containers. The LinuxContainerExecutor
supports selectively launching containers in Docker containers and should
be used instead.@Deprecated public class DockerContainerExecutor extends ContainerExecutor
ContainerExecutor.DelayedProcessKiller, ContainerExecutor.ExitCode, ContainerExecutor.Signal| Modifier and Type | Field and Description |
|---|---|
static String |
DOCKER_CONTAINER_EXECUTOR_SCRIPT
Deprecated.
|
static String |
DOCKER_CONTAINER_EXECUTOR_SESSION_SCRIPT
Deprecated.
|
static String |
DOCKER_IMAGE_PATTERN
Deprecated.
|
DIRECTORY_CONTENTS, TASK_LAUNCH_SCRIPT_PERMISSION, TOKEN_FILE_NAME_FMT, WILDCARD| Constructor and Description |
|---|
DockerContainerExecutor()
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
static boolean |
containerIsAlive(String pid)
Deprecated.
Returns true if the process with the specified pid is alive.
|
protected void |
copyFile(org.apache.hadoop.fs.Path src,
org.apache.hadoop.fs.Path dst,
String owner)
Deprecated.
|
protected void |
createDir(org.apache.hadoop.fs.Path dirPath,
org.apache.hadoop.fs.permission.FsPermission perms,
boolean createParent,
String user)
Deprecated.
|
void |
deleteAsUser(DeletionAsUserContext ctx)
Deprecated.
Delete specified directories as a given user.
|
protected org.apache.hadoop.fs.Path |
getWorkingDir(List<String> localDirs,
String user,
String appId)
Deprecated.
|
void |
init(Context nmContext)
Deprecated.
Run the executor initialization steps.
|
boolean |
isContainerAlive(ContainerLivenessContext ctx)
Deprecated.
Check if a container is alive.
|
protected void |
killContainer(String pid,
ContainerExecutor.Signal signal)
Deprecated.
Send a specified signal to the specified pid
|
int |
launchContainer(ContainerStartContext ctx)
Deprecated.
Launch the container on the node.
|
boolean |
signalContainer(ContainerSignalContext ctx)
Deprecated.
Signal container with the specified signal.
|
void |
startLocalizer(LocalizerStartContext ctx)
Deprecated.
Prepare the environment for containers in this application to execute.
|
void |
symLink(String target,
String symlink)
Deprecated.
Create a symlink file which points to the target.
|
activateContainer, deactivateContainer, getConf, getIpAndHost, getLocalIpAndHost, getNMEnvVar, getPidFilePath, getProcessId, getRunCommand, getRunCommand, getRunCommandForOther, getRunCommandForWindows, isContainerActive, localizeClasspathJar, logOutput, pauseContainer, reacquireContainer, readDirAsUser, resumeContainer, setConf, writeLaunchEnv, writeLaunchEnvpublic static final String DOCKER_CONTAINER_EXECUTOR_SCRIPT
public static final String DOCKER_CONTAINER_EXECUTOR_SESSION_SCRIPT
public static final String DOCKER_IMAGE_PATTERN
protected void copyFile(org.apache.hadoop.fs.Path src,
org.apache.hadoop.fs.Path dst,
String owner)
throws IOException
IOExceptionpublic void init(Context nmContext) throws IOException
ContainerExecutorinit in class ContainerExecutornmContext - Context of NMIOException - if initialization failspublic void startLocalizer(LocalizerStartContext ctx) throws IOException, InterruptedException
ContainerExecutorFor $x in local.dirs create $x/$user/$appId Copy $nmLocal/appTokens -> $N/$user/$appId For $rsrc in private resources Copy $rsrc -> $N/$user/filecache/[idef] For $rsrc in job resources Copy $rsrc -> $N/$user/$appId/filecache/idef
startLocalizer in class ContainerExecutorctx - LocalizerStartContext that encapsulates necessary information
for starting a localizer.IOException - for most application init failuresInterruptedException - if application init thread is halted by NMpublic int launchContainer(ContainerStartContext ctx) throws IOException
ContainerExecutorlaunchContainer in class ContainerExecutorctx - Encapsulates information necessary for launching containers.IOException - if the container launch failspublic boolean signalContainer(ContainerSignalContext ctx) throws IOException
ContainerExecutorsignalContainer in class ContainerExecutorctx - Encapsulates information necessary for signaling containers.IOException - if signaling the container failspublic boolean isContainerAlive(ContainerLivenessContext ctx) throws IOException
ContainerExecutorisContainerAlive in class ContainerExecutorctx - Encapsulates information necessary for container liveness check.IOException - if there is a failure while checking the container
statuspublic static boolean containerIsAlive(String pid) throws IOException
pid - String pidIOExceptionprotected void killContainer(String pid, ContainerExecutor.Signal signal) throws IOException
pid - the pid of the process [group] to signal.signal - signal to send
(for logging).IOExceptionpublic void deleteAsUser(DeletionAsUserContext ctx) throws IOException, InterruptedException
ContainerExecutordeleteAsUser in class ContainerExecutorctx - Encapsulates information necessary for deletion.IOException - if delete failsInterruptedException - if interrupted while waiting for the deletion
operation to completepublic void symLink(String target, String symlink) throws IOException
ContainerExecutorsymLink in class ContainerExecutortarget - The target for symlinksymlink - the symlink fileIOException - Error when creating symlinksprotected void createDir(org.apache.hadoop.fs.Path dirPath,
org.apache.hadoop.fs.permission.FsPermission perms,
boolean createParent,
String user)
throws IOException
IOExceptionprotected org.apache.hadoop.fs.Path getWorkingDir(List<String> localDirs, String user, String appId) throws IOException
IOExceptionCopyright © 2022 Apache Software Foundation. All rights reserved.