|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.oozie.action.ActionExecutor org.apache.oozie.action.hadoop.JavaActionExecutor
public class JavaActionExecutor
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.apache.oozie.action.ActionExecutor |
---|
ActionExecutor.Context |
Field Summary |
---|
Fields inherited from class org.apache.oozie.action.ActionExecutor |
---|
CONF_PREFIX, ERROR_OTHER, MAX_RETRIES, RETRY_INTERVAL |
Constructor Summary | |
---|---|
|
JavaActionExecutor()
|
protected |
JavaActionExecutor(String type)
|
Method Summary | |
---|---|
void |
check(ActionExecutor.Context context,
org.apache.oozie.client.WorkflowAction action)
Check if an action has completed. |
org.apache.hadoop.conf.Configuration |
createBaseHadoopConf(ActionExecutor.Context context,
org.jdom.Element actionXml)
|
protected org.apache.hadoop.mapred.JobClient |
createJobClient(ActionExecutor.Context context,
org.apache.hadoop.mapred.JobConf jobConf)
Create job client object |
void |
end(ActionExecutor.Context context,
org.apache.oozie.client.WorkflowAction action)
End an action after it has executed. |
protected HashMap<String,CredentialsProperties> |
getActionCredentialsProperties(ActionExecutor.Context context,
org.apache.oozie.client.WorkflowAction action)
|
protected org.apache.hadoop.fs.FileSystem |
getActionFileSystem(ActionExecutor.Context context,
org.jdom.Element actionXml)
|
protected org.apache.hadoop.fs.FileSystem |
getActionFileSystem(ActionExecutor.Context context,
org.apache.oozie.client.WorkflowAction action)
|
protected boolean |
getCaptureOutput(org.apache.oozie.client.WorkflowAction action)
|
protected CredentialsProperties |
getCredProperties(ActionExecutor.Context context,
String credName)
|
protected List<Class> |
getLauncherClasses()
|
protected String |
getLauncherJarName()
|
protected String |
getLauncherMain(org.apache.hadoop.conf.Configuration launcherConf,
org.jdom.Element actionXml)
|
void |
initActionType()
Invoked once at system initialization time. |
boolean |
isCompleted(String externalStatus)
Return if the external status indicates that the action has completed. |
void |
kill(ActionExecutor.Context context,
org.apache.oozie.client.WorkflowAction action)
Kill an action. |
void |
prepareActionDir(org.apache.hadoop.fs.FileSystem actionFs,
ActionExecutor.Context context)
|
protected HashMap<String,CredentialsProperties> |
setCredentialPropertyToActionConf(ActionExecutor.Context context,
org.apache.oozie.client.WorkflowAction action,
org.apache.hadoop.conf.Configuration actionConf)
|
protected void |
setCredentialTokens(org.apache.hadoop.mapred.JobConf jobconf,
ActionExecutor.Context context,
org.apache.oozie.client.WorkflowAction action,
HashMap<String,CredentialsProperties> credPropertiesMap)
|
void |
start(ActionExecutor.Context context,
org.apache.oozie.client.WorkflowAction action)
Start an action. |
void |
submitLauncher(org.apache.hadoop.fs.FileSystem actionFs,
ActionExecutor.Context context,
org.apache.oozie.client.WorkflowAction action)
|
Methods inherited from class org.apache.oozie.action.ActionExecutor |
---|
convertException, disableInit, enableInit, getActionDir, getActionDirPath, getActionSignal, getMaxRetries, getOozieConf, getOozieRuntimeDir, getOozieSystemId, getRetryInterval, getType, registerError, resetInitInfo, setMaxRetries, setRetryInterval |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JavaActionExecutor()
protected JavaActionExecutor(String type)
Method Detail |
---|
protected String getLauncherJarName()
protected List<Class> getLauncherClasses()
public void initActionType()
ActionExecutor
ActionExecutor.registerError(java.lang.String, org.apache.oozie.action.ActionExecutorException.ErrorType, java.lang.String)
method to register
all its possible errors. Subclasses overriding must invoke super.
initActionType
in class ActionExecutor
public org.apache.hadoop.conf.Configuration createBaseHadoopConf(ActionExecutor.Context context, org.jdom.Element actionXml)
protected org.apache.hadoop.fs.FileSystem getActionFileSystem(ActionExecutor.Context context, org.apache.oozie.client.WorkflowAction action) throws ActionExecutorException
ActionExecutorException
protected org.apache.hadoop.fs.FileSystem getActionFileSystem(ActionExecutor.Context context, org.jdom.Element actionXml) throws ActionExecutorException
ActionExecutorException
public void prepareActionDir(org.apache.hadoop.fs.FileSystem actionFs, ActionExecutor.Context context) throws ActionExecutorException
ActionExecutorException
protected String getLauncherMain(org.apache.hadoop.conf.Configuration launcherConf, org.jdom.Element actionXml)
public void submitLauncher(org.apache.hadoop.fs.FileSystem actionFs, ActionExecutor.Context context, org.apache.oozie.client.WorkflowAction action) throws ActionExecutorException
ActionExecutorException
protected HashMap<String,CredentialsProperties> setCredentialPropertyToActionConf(ActionExecutor.Context context, org.apache.oozie.client.WorkflowAction action, org.apache.hadoop.conf.Configuration actionConf) throws Exception
Exception
protected void setCredentialTokens(org.apache.hadoop.mapred.JobConf jobconf, ActionExecutor.Context context, org.apache.oozie.client.WorkflowAction action, HashMap<String,CredentialsProperties> credPropertiesMap) throws Exception
Exception
protected HashMap<String,CredentialsProperties> getActionCredentialsProperties(ActionExecutor.Context context, org.apache.oozie.client.WorkflowAction action) throws Exception
Exception
protected CredentialsProperties getCredProperties(ActionExecutor.Context context, String credName) throws Exception
Exception
public void start(ActionExecutor.Context context, org.apache.oozie.client.WorkflowAction action) throws ActionExecutorException
ActionExecutor
ActionExecutor.Context.setStartData(java.lang.String, java.lang.String, java.lang.String)
method must be called within this method. If the
action has completed, the ActionExecutor.Context.setExecutionData(java.lang.String, java.util.Properties)
method must be called within this method.
start
in class ActionExecutor
context
- executor context.action
- the action to start.
ActionExecutorException
- thrown if the action could not start.public void end(ActionExecutor.Context context, org.apache.oozie.client.WorkflowAction action) throws ActionExecutorException
ActionExecutor
ActionExecutor.Context.setEndData(org.apache.oozie.client.WorkflowAction.Status, java.lang.String)
method must be called within this
method.
end
in class ActionExecutor
context
- executor context.action
- the action to end.
ActionExecutorException
- thrown if the action could not end.protected org.apache.hadoop.mapred.JobClient createJobClient(ActionExecutor.Context context, org.apache.hadoop.mapred.JobConf jobConf) throws HadoopAccessorException
context
- jobConf
-
HadoopAccessorException
public void check(ActionExecutor.Context context, org.apache.oozie.client.WorkflowAction action) throws ActionExecutorException
ActionExecutor
ActionExecutor.Context.setExecutionData(java.lang.String, java.util.Properties)
method must be called within this method. If the action
has not completed, the ActionExecutor.Context.setExternalStatus(java.lang.String)
method must be called within this method.
check
in class ActionExecutor
context
- executor context.action
- the action to end.
ActionExecutorException
- thrown if the action could not be checked.protected boolean getCaptureOutput(org.apache.oozie.client.WorkflowAction action) throws org.jdom.JDOMException
org.jdom.JDOMException
public void kill(ActionExecutor.Context context, org.apache.oozie.client.WorkflowAction action) throws ActionExecutorException
ActionExecutor
ActionExecutor.Context.setEndData(org.apache.oozie.client.WorkflowAction.Status, java.lang.String)
method must be called within this method.
kill
in class ActionExecutor
context
- executor context.action
- the action to kill.
ActionExecutorException
- thrown if the action could not be killed.public boolean isCompleted(String externalStatus)
ActionExecutor
isCompleted
in class ActionExecutor
externalStatus
- external status to check.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |