org.apache.oozie.action.hadoop
Class ShellMain
java.lang.Object
org.apache.oozie.action.hadoop.LauncherMain
org.apache.oozie.action.hadoop.ShellMain
public class ShellMain
- extends LauncherMain
Method Summary |
protected String |
getExec(org.apache.hadoop.conf.Configuration actionConf)
Retrieve the executable name that was originally specified to
Workflow.xml. |
protected List<String> |
getShellArguments(org.apache.hadoop.conf.Configuration actionConf)
Retrieve the list of arguments that were originally specified to
Workflow.xml. |
protected Thread[] |
handleShellOutput(Process p,
boolean captureOutput)
Print the output written by the Shell execution in its stdout/stderr. |
protected org.apache.hadoop.conf.Configuration |
loadActionConf()
Read action configuration passes through action xml file. |
static void |
main(String[] args)
|
protected void |
printCommand(ArrayList<String> cmdArray,
Map<String,String> envp)
Print the command including the arguments as well as the environment
setup |
protected void |
run(String[] args)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CONF_OOZIE_SHELL_ARGS
public static final String CONF_OOZIE_SHELL_ARGS
- See Also:
- Constant Field Values
CONF_OOZIE_SHELL_EXEC
public static final String CONF_OOZIE_SHELL_EXEC
- See Also:
- Constant Field Values
CONF_OOZIE_SHELL_ENVS
public static final String CONF_OOZIE_SHELL_ENVS
- See Also:
- Constant Field Values
CONF_OOZIE_SHELL_CAPTURE_OUTPUT
public static final String CONF_OOZIE_SHELL_CAPTURE_OUTPUT
- See Also:
- Constant Field Values
OOZIE_ACTION_CONF_XML
public static final String OOZIE_ACTION_CONF_XML
- See Also:
- Constant Field Values
ShellMain
public ShellMain()
main
public static void main(String[] args)
throws Exception
- Parameters:
args
- Invoked from LauncherMapper:map()
- Throws:
Exception
run
protected void run(String[] args)
throws Exception
- Specified by:
run
in class LauncherMain
- Throws:
Exception
handleShellOutput
protected Thread[] handleShellOutput(Process p,
boolean captureOutput)
throws IOException
- Print the output written by the Shell execution in its stdout/stderr.
Also write the stdout output to a file for capturing.
- Parameters:
p
- processcaptureOutput
- indicates if STDOUT should be captured or not.
- Returns:
- Array of threads (one for stdout and another one for stderr
processing
- Throws:
IOException
- thrown if an IO error occurrs.
printCommand
protected void printCommand(ArrayList<String> cmdArray,
Map<String,String> envp)
- Print the command including the arguments as well as the environment
setup
- Parameters:
cmdArray
- :Command Arrayenvp
- :Environment array
getShellArguments
protected List<String> getShellArguments(org.apache.hadoop.conf.Configuration actionConf)
- Retrieve the list of arguments that were originally specified to
Workflow.xml.
- Parameters:
actionConf
-
- Returns:
- argument list
getExec
protected String getExec(org.apache.hadoop.conf.Configuration actionConf)
- Retrieve the executable name that was originally specified to
Workflow.xml.
- Parameters:
actionConf
-
- Returns:
- executable
loadActionConf
protected org.apache.hadoop.conf.Configuration loadActionConf()
throws IOException
- Read action configuration passes through action xml file.
- Returns:
- action Configuration
- Throws:
IOException
Copyright © 2013 Apache Software Foundation. All Rights Reserved.