public class WindowsSecureContainerExecutor extends DefaultContainerExecutor
DefaultContainerExecutor.LocalWrapperScriptBuilderContainerExecutor.DelayedProcessKiller, ContainerExecutor.ExitCode, ContainerExecutor.Signal| Modifier and Type | Field and Description |
|---|---|
static String |
LOCALIZER_PID_FORMAT |
lfsTASK_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(org.apache.hadoop.fs.Path nmPrivateContainerTokens,
InetSocketAddress nmAddr,
String user,
String appId,
String locId,
LocalDirsHandlerService dirsHandler)
Prepare the environment for containers in this application to execute.
|
containerIsAlive, deleteAsUser, getWorkingDir, init, isContainerProcessAlive, launchContainer, signalContaineractivateContainer, deactivateContainer, getConf, getPidFilePath, getProcessId, getRunCommand, isContainerActive, logOutput, reacquireContainer, writeLaunchEnvpublic static final String LOCALIZER_PID_FORMAT
public WindowsSecureContainerExecutor()
throws IOException,
URISyntaxException
IOExceptionURISyntaxExceptionpublic void setConf(org.apache.hadoop.conf.Configuration conf)
setConf in interface org.apache.hadoop.conf.ConfigurablesetConf in class ContainerExecutorprotected String[] getRunCommand(String command, String groupId, String userName, org.apache.hadoop.fs.Path pidFile, org.apache.hadoop.conf.Configuration conf)
getRunCommand in class ContainerExecutorprotected DefaultContainerExecutor.LocalWrapperScriptBuilder getLocalWrapperScriptBuilder(String containerIdStr, org.apache.hadoop.fs.Path containerWorkDir)
getLocalWrapperScriptBuilder in class DefaultContainerExecutorprotected void copyFile(org.apache.hadoop.fs.Path src,
org.apache.hadoop.fs.Path dst,
String owner)
throws IOException
copyFile in class DefaultContainerExecutorIOExceptionprotected void createDir(org.apache.hadoop.fs.Path dirPath,
org.apache.hadoop.fs.permission.FsPermission perms,
boolean createParent,
String owner)
throws IOException
createDir in class DefaultContainerExecutorIOExceptionprotected void setScriptExecutable(org.apache.hadoop.fs.Path script,
String owner)
throws IOException
setScriptExecutable in class DefaultContainerExecutorIOExceptionpublic org.apache.hadoop.fs.Path localizeClasspathJar(org.apache.hadoop.fs.Path classPathJar,
org.apache.hadoop.fs.Path pwd,
String owner)
throws IOException
ContainerExecutorlocalizeClasspathJar in class ContainerExecutorIOExceptionpublic void startLocalizer(org.apache.hadoop.fs.Path nmPrivateContainerTokens,
InetSocketAddress nmAddr,
String user,
String appId,
String locId,
LocalDirsHandlerService dirsHandler)
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 DefaultContainerExecutornmPrivateContainerTokens - path to localized credentials, rsrc by NMnmAddr - RPC address to contact NMuser - user name of application ownerappId - id of the applicationdirsHandler - NM local dirs service, for nm-local-dirs and nm-log-dirsIOException - 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 DefaultContainerExecutorIOExceptionprotected void killContainer(String pid, ContainerExecutor.Signal signal) throws IOException
DefaultContainerExecutorkillContainer in class DefaultContainerExecutorpid - the pid of the process [group] to signal.signal - signal to send
(for logging).IOExceptionCopyright © 2016 Apache Software Foundation. All Rights Reserved.