public class SubWorkflowActionExecutor extends ActionExecutor
ActionExecutor.Context, ActionExecutor.RETRYPOLICY| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ACTION_TYPE |
static java.lang.String |
LOCAL |
XLog |
LOG |
static java.lang.String |
PARENT_ID |
static java.lang.String |
SUBWORKFLOW_DEPTH |
static java.lang.String |
SUBWORKFLOW_MAX_DEPTH |
static java.lang.String |
SUBWORKFLOW_RERUN |
static java.lang.String |
SUPER_PARENT_ID |
ACTION_RETRY_INTERVAL, ACTION_RETRY_POLICY, CONF_PREFIX, ERROR_OTHER, MAX_RETRIES, OOZIE_ACTION_YARN_TAG, RETRY_INTERVAL| Modifier | Constructor and Description |
|---|---|
protected |
SubWorkflowActionExecutor() |
| Modifier and Type | Method and Description |
|---|---|
void |
check(ActionExecutor.Context context,
org.apache.oozie.client.WorkflowAction action)
Check if an action has completed.
|
protected java.lang.String |
checkIfRunning(org.apache.oozie.client.OozieClient oozieClient,
java.lang.String extId) |
void |
end(ActionExecutor.Context context,
org.apache.oozie.client.WorkflowAction action)
End an action after it has executed.
|
protected org.apache.oozie.client.OozieClient |
getWorkflowClient(ActionExecutor.Context context,
java.lang.String oozieUri) |
void |
initActionType()
Invoked once at system initialization time.
|
protected void |
injectCallback(ActionExecutor.Context context,
org.apache.hadoop.conf.Configuration conf) |
protected void |
injectInline(org.jdom.Element eConf,
org.apache.hadoop.conf.Configuration subWorkflowConf) |
protected void |
injectParent(java.lang.String parentId,
org.apache.hadoop.conf.Configuration conf) |
protected void |
injectRecovery(java.lang.String externalId,
org.apache.hadoop.conf.Configuration conf) |
protected void |
injectSuperParent(org.apache.oozie.client.WorkflowJob parentWorkflow,
org.apache.hadoop.conf.Configuration parentConf,
org.apache.hadoop.conf.Configuration conf) |
boolean |
isCompleted(java.lang.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 |
start(ActionExecutor.Context context,
org.apache.oozie.client.WorkflowAction action)
Start an action.
|
boolean |
supportsConfigurationJobXML()
Returns true if this action type supports a Configuration and JobXML.
|
protected void |
verifyAndInjectSubworkflowDepth(org.apache.hadoop.conf.Configuration parentConf,
org.apache.hadoop.conf.Configuration conf) |
convertException, disableInit, enableInit, getActionDir, getActionDirPath, getActionSignal, getActionYarnTag, getMaxRetries, getOozieConf, getOozieRuntimeDir, getOozieSystemId, getRetryInterval, getRetryPolicy, getType, registerError, requiresNameNodeJobTracker, resetInitInfo, setMaxRetries, setRetryInterval, setRetryPolicypublic static final java.lang.String ACTION_TYPE
public static final java.lang.String LOCAL
public static final java.lang.String PARENT_ID
public static final java.lang.String SUPER_PARENT_ID
public static final java.lang.String SUBWORKFLOW_MAX_DEPTH
public static final java.lang.String SUBWORKFLOW_DEPTH
public static final java.lang.String SUBWORKFLOW_RERUN
protected SubWorkflowActionExecutor()
public void initActionType()
ActionExecutorActionExecutor.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 ActionExecutorprotected org.apache.oozie.client.OozieClient getWorkflowClient(ActionExecutor.Context context, java.lang.String oozieUri)
protected void injectInline(org.jdom.Element eConf, org.apache.hadoop.conf.Configuration subWorkflowConf) throws java.io.IOException, ActionExecutorException
java.io.IOExceptionActionExecutorExceptionprotected void injectCallback(ActionExecutor.Context context, org.apache.hadoop.conf.Configuration conf)
protected void injectRecovery(java.lang.String externalId, org.apache.hadoop.conf.Configuration conf)
protected void injectParent(java.lang.String parentId, org.apache.hadoop.conf.Configuration conf)
protected void injectSuperParent(org.apache.oozie.client.WorkflowJob parentWorkflow, org.apache.hadoop.conf.Configuration parentConf, org.apache.hadoop.conf.Configuration conf)
protected void verifyAndInjectSubworkflowDepth(org.apache.hadoop.conf.Configuration parentConf, org.apache.hadoop.conf.Configuration conf) throws ActionExecutorException
ActionExecutorExceptionprotected java.lang.String checkIfRunning(org.apache.oozie.client.OozieClient oozieClient, java.lang.String extId) throws org.apache.oozie.client.OozieClientException
org.apache.oozie.client.OozieClientExceptionpublic void start(ActionExecutor.Context context, org.apache.oozie.client.WorkflowAction action) throws ActionExecutorException
ActionExecutorActionExecutor.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 ActionExecutorcontext - 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
ActionExecutorActionExecutor.Context.setEndData(org.apache.oozie.client.WorkflowAction.Status, java.lang.String) method must be called within this
method.end in class ActionExecutorcontext - executor context.action - the action to end.ActionExecutorException - thrown if the action could not end.public void check(ActionExecutor.Context context, org.apache.oozie.client.WorkflowAction action) throws ActionExecutorException
ActionExecutorActionExecutor.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 ActionExecutorcontext - executor context.action - the action to end.ActionExecutorException - thrown if the action could not be checked.public void kill(ActionExecutor.Context context, org.apache.oozie.client.WorkflowAction action) throws ActionExecutorException
ActionExecutorActionExecutor.Context.setEndData(org.apache.oozie.client.WorkflowAction.Status, java.lang.String) method must be called within this method.kill in class ActionExecutorcontext - executor context.action - the action to kill.ActionExecutorException - thrown if the action could not be killed.public boolean isCompleted(java.lang.String externalStatus)
ActionExecutorisCompleted in class ActionExecutorexternalStatus - external status to check.public boolean supportsConfigurationJobXML()
ActionExecutorsupportsConfigurationJobXML in class ActionExecutorCopyright © 2018 Apache Software Foundation. All Rights Reserved.