public abstract static class ContainerLaunch.ShellScriptBuilder extends Object
Modifier and Type | Field and Description |
---|---|
protected static String |
ENV_PRELAUNCH_STDERR |
protected static String |
ENV_PRELAUNCH_STDOUT |
Constructor and Description |
---|
ContainerLaunch.ShellScriptBuilder() |
Modifier and Type | Method and Description |
---|---|
protected void |
buildCommand(String... command) |
abstract void |
command(List<String> command) |
abstract void |
copyDebugInformation(org.apache.hadoop.fs.Path src,
org.apache.hadoop.fs.Path dst)
Method to copy files that are useful for debugging container failures.
|
static ContainerLaunch.ShellScriptBuilder |
create() |
abstract void |
echo(String echoStr) |
abstract void |
env(String key,
String value) |
protected void |
line(String... command) |
protected void |
linebreak(String... command) |
protected abstract void |
link(org.apache.hadoop.fs.Path src,
org.apache.hadoop.fs.Path dst) |
abstract void |
listDebugInformation(org.apache.hadoop.fs.Path output)
Method to dump debug information to a target file.
|
protected abstract void |
mkdir(org.apache.hadoop.fs.Path path) |
void |
setExitOnFailure() |
protected abstract void |
setStdErr(org.apache.hadoop.fs.Path stdout) |
protected abstract void |
setStdOut(org.apache.hadoop.fs.Path stdout) |
void |
stderr(org.apache.hadoop.fs.Path stderrDir,
String stdErrFile)
Set stderr for the shell script
|
void |
stdout(org.apache.hadoop.fs.Path stdoutDir,
String stdOutFile)
Set stdout for the shell script
|
void |
symlink(org.apache.hadoop.fs.Path src,
org.apache.hadoop.fs.Path dst) |
String |
toString() |
void |
write(PrintStream out) |
protected static final String ENV_PRELAUNCH_STDOUT
protected static final String ENV_PRELAUNCH_STDERR
public static ContainerLaunch.ShellScriptBuilder create()
public abstract void command(List<String> command) throws IOException
IOException
public final void stdout(org.apache.hadoop.fs.Path stdoutDir, String stdOutFile) throws IOException
stdoutDir
- stdout must be an absolute pathstdOutFile
- stdout file nameIOException
- thrown when stdout path is not absolutepublic final void stderr(org.apache.hadoop.fs.Path stderrDir, String stdErrFile) throws IOException
stderrDir
- stderr must be an absolute pathstdErrFile
- stderr file nameIOException
- thrown when stderr path is not absoluteprotected abstract void setStdOut(org.apache.hadoop.fs.Path stdout) throws IOException
IOException
protected abstract void setStdErr(org.apache.hadoop.fs.Path stdout) throws IOException
IOException
public abstract void env(String key, String value) throws IOException
IOException
public abstract void echo(String echoStr) throws IOException
IOException
public final void symlink(org.apache.hadoop.fs.Path src, org.apache.hadoop.fs.Path dst) throws IOException
IOException
public abstract void copyDebugInformation(org.apache.hadoop.fs.Path src, org.apache.hadoop.fs.Path dst) throws IOException
src
- path to the source filedst
- path to the destination file - should be absoluteIOException
public abstract void listDebugInformation(org.apache.hadoop.fs.Path output) throws IOException
output
- the file to which debug information is to be writtenIOException
public final void write(PrintStream out) throws IOException
IOException
protected final void buildCommand(String... command)
protected final void linebreak(String... command)
protected final void line(String... command)
public void setExitOnFailure()
protected abstract void link(org.apache.hadoop.fs.Path src, org.apache.hadoop.fs.Path dst) throws IOException
IOException
protected abstract void mkdir(org.apache.hadoop.fs.Path path) throws IOException
IOException
Copyright © 2018 Apache Software Foundation. All Rights Reserved.