public class SubWorkflowActionExecutor extends ActionExecutor
ActionExecutor.Context, ActionExecutor.RETRYPOLICY
Modifier and Type | Field and Description |
---|---|
static String |
ACTION_TYPE |
static String |
LOCAL |
XLog |
LOG |
static String |
PARENT_ID |
static String |
SUBWORKFLOW_DEPTH |
static String |
SUBWORKFLOW_MAX_DEPTH |
static String |
SUBWORKFLOW_RERUN |
static 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,
WorkflowAction action)
Check if an action has completed.
|
protected String |
checkIfRunning(OozieClient oozieClient,
String extId) |
void |
end(ActionExecutor.Context context,
WorkflowAction action)
End an action after it has executed.
|
protected OozieClient |
getWorkflowClient(ActionExecutor.Context context,
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(String parentId,
org.apache.hadoop.conf.Configuration conf) |
protected void |
injectRecovery(String externalId,
org.apache.hadoop.conf.Configuration conf) |
protected void |
injectSuperParent(WorkflowJob parentWorkflow,
org.apache.hadoop.conf.Configuration parentConf,
org.apache.hadoop.conf.Configuration conf) |
boolean |
isCompleted(String externalStatus)
Return if the external status indicates that the action has completed.
|
void |
kill(ActionExecutor.Context context,
WorkflowAction action)
Kill an action.
|
void |
start(ActionExecutor.Context context,
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, setRetryPolicy
public static final String ACTION_TYPE
public static final String LOCAL
public static final String PARENT_ID
public static final String SUPER_PARENT_ID
public static final String SUBWORKFLOW_MAX_DEPTH
public static final String SUBWORKFLOW_DEPTH
public static final String SUBWORKFLOW_RERUN
protected SubWorkflowActionExecutor()
public void initActionType()
ActionExecutor
It can be used to register error information for the expected exceptions. Exceptions should be register from subclasses to superclasses to ensure proper detection, same thing that it is done in a normal catch.
This method should invoke the 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
protected OozieClient getWorkflowClient(ActionExecutor.Context context, String oozieUri)
protected void injectInline(org.jdom.Element eConf, org.apache.hadoop.conf.Configuration subWorkflowConf) throws IOException, ActionExecutorException
IOException
ActionExecutorException
protected void injectCallback(ActionExecutor.Context context, org.apache.hadoop.conf.Configuration conf)
protected void injectRecovery(String externalId, org.apache.hadoop.conf.Configuration conf)
protected void injectParent(String parentId, org.apache.hadoop.conf.Configuration conf)
protected void injectSuperParent(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
ActionExecutorException
protected String checkIfRunning(OozieClient oozieClient, String extId) throws OozieClientException
OozieClientException
public void start(ActionExecutor.Context context, WorkflowAction action) throws ActionExecutorException
ActionExecutor
The 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, WorkflowAction action) throws ActionExecutorException
ActionExecutor
The 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.public void check(ActionExecutor.Context context, WorkflowAction action) throws ActionExecutorException
ActionExecutor
If the action
has completed, the 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.public void kill(ActionExecutor.Context context, WorkflowAction action) throws ActionExecutorException
ActionExecutor
The 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.public boolean supportsConfigurationJobXML()
ActionExecutor
supportsConfigurationJobXML
in class ActionExecutor
Copyright © 2016 Apache Software Foundation. All rights reserved.