public class WindowsSecureContainerExecutor extends DefaultContainerExecutor
DefaultContainerExecutor.LocalWrapperScriptBuilder
ContainerExecutor.DelayedProcessKiller, ContainerExecutor.ExitCode, ContainerExecutor.Signal
Modifier and Type | Field and Description |
---|---|
static String |
LOCALIZER_PID_FORMAT |
lfs
DIRECTORY_CONTENTS, TASK_LAUNCH_SCRIPT_PERMISSION
Constructor and Description |
---|
WindowsSecureContainerExecutor() |
Modifier and Type | Method and Description |
---|---|
protected org.apache.hadoop.util.Shell.CommandExecutor |
buildCommandExecutor(String wrapperScriptPath,
String containerIdStr,
String userName,
org.apache.hadoop.fs.Path pidFile,
org.apache.hadoop.yarn.api.records.Resource resource,
File wordDir,
Map<String,String> environment) |
protected void |
copyFile(org.apache.hadoop.fs.Path src,
org.apache.hadoop.fs.Path dst,
String owner) |
protected void |
createDir(org.apache.hadoop.fs.Path dirPath,
org.apache.hadoop.fs.permission.FsPermission perms,
boolean createParent,
String owner) |
protected DefaultContainerExecutor.LocalWrapperScriptBuilder |
getLocalWrapperScriptBuilder(String containerIdStr,
org.apache.hadoop.fs.Path containerWorkDir) |
protected String[] |
getRunCommand(String command,
String groupId,
String userName,
org.apache.hadoop.fs.Path pidFile,
org.apache.hadoop.conf.Configuration conf) |
protected void |
killContainer(String pid,
ContainerExecutor.Signal signal)
Send a specified signal to the specified pid
|
org.apache.hadoop.fs.Path |
localizeClasspathJar(org.apache.hadoop.fs.Path classPathJar,
org.apache.hadoop.fs.Path pwd,
String owner)
On Windows the ContainerLaunch creates a temporary special jar manifest of
other jars to workaround the CLASSPATH length.
|
void |
setConf(org.apache.hadoop.conf.Configuration conf) |
protected void |
setScriptExecutable(org.apache.hadoop.fs.Path script,
String owner) |
void |
startLocalizer(LocalizerStartContext ctx)
Prepare the environment for containers in this application to execute.
|
containerIsAlive, createContainerLocalizer, deleteAsUser, getWorkingDir, init, isContainerAlive, launchContainer, signalContainer
activateContainer, deactivateContainer, getConf, getPidFilePath, getProcessId, getRunCommand, isContainerActive, logOutput, reacquireContainer, writeLaunchEnv, writeLaunchEnv
public static final String LOCALIZER_PID_FORMAT
public WindowsSecureContainerExecutor() throws IOException, URISyntaxException
IOException
URISyntaxException
public void setConf(org.apache.hadoop.conf.Configuration conf)
setConf
in interface org.apache.hadoop.conf.Configurable
setConf
in class ContainerExecutor
protected String[] getRunCommand(String command, String groupId, String userName, org.apache.hadoop.fs.Path pidFile, org.apache.hadoop.conf.Configuration conf)
getRunCommand
in class ContainerExecutor
protected DefaultContainerExecutor.LocalWrapperScriptBuilder getLocalWrapperScriptBuilder(String containerIdStr, org.apache.hadoop.fs.Path containerWorkDir)
getLocalWrapperScriptBuilder
in class DefaultContainerExecutor
protected void copyFile(org.apache.hadoop.fs.Path src, org.apache.hadoop.fs.Path dst, String owner) throws IOException
copyFile
in class DefaultContainerExecutor
IOException
protected void createDir(org.apache.hadoop.fs.Path dirPath, org.apache.hadoop.fs.permission.FsPermission perms, boolean createParent, String owner) throws IOException
createDir
in class DefaultContainerExecutor
IOException
protected void setScriptExecutable(org.apache.hadoop.fs.Path script, String owner) throws IOException
setScriptExecutable
in class DefaultContainerExecutor
IOException
public org.apache.hadoop.fs.Path localizeClasspathJar(org.apache.hadoop.fs.Path classPathJar, org.apache.hadoop.fs.Path pwd, String owner) throws IOException
ContainerExecutor
localizeClasspathJar
in class ContainerExecutor
IOException
public void startLocalizer(LocalizerStartContext ctx) throws IOException, InterruptedException
ContainerExecutor
For $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 DefaultContainerExecutor
ctx
- LocalizerStartContext that encapsulates necessary information
for starting a localizer.IOException
- For most application init failuresInterruptedException
- If application init thread is halted by NMprotected org.apache.hadoop.util.Shell.CommandExecutor buildCommandExecutor(String wrapperScriptPath, String containerIdStr, String userName, org.apache.hadoop.fs.Path pidFile, org.apache.hadoop.yarn.api.records.Resource resource, File wordDir, Map<String,String> environment) throws IOException
buildCommandExecutor
in class DefaultContainerExecutor
IOException
protected void killContainer(String pid, ContainerExecutor.Signal signal) throws IOException
DefaultContainerExecutor
killContainer
in class DefaultContainerExecutor
pid
- the pid of the process [group] to signal.signal
- signal to send
(for logging).IOException
Copyright © 2017 Apache Software Foundation. All Rights Reserved.