public class FsActionExecutor extends ActionExecutor
This executes the file system mkdir, move and delete commands
ActionExecutor.Context, ActionExecutor.RETRYPOLICY| Modifier and Type | Field and Description |
|---|---|
static String |
ACTION_TYPE |
ACTION_RETRY_INTERVAL, ACTION_RETRY_POLICY, CONF_PREFIX, ERROR_OTHER, MAX_RETRIES, OOZIE_ACTION_YARN_TAG, RETRY_INTERVAL| Constructor and Description |
|---|
FsActionExecutor() |
| Modifier and Type | Method and Description |
|---|---|
void |
check(ActionExecutor.Context context,
WorkflowAction action)
Check if an action has completed.
|
void |
delete(ActionExecutor.Context context,
org.apache.hadoop.fs.Path path)
Delete path
|
void |
delete(ActionExecutor.Context context,
XConfiguration fsConf,
org.apache.hadoop.fs.Path nameNodePath,
org.apache.hadoop.fs.Path path,
boolean skipTrash)
Delete path
|
void |
delete(String user,
String group,
org.apache.hadoop.fs.Path path)
Delete path
|
void |
end(ActionExecutor.Context context,
WorkflowAction action)
End an action after it has executed.
|
org.apache.hadoop.fs.Path |
getRecoveryPath(ActionExecutor.Context context) |
void |
initActionType()
Initialize Action.
|
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 |
move(ActionExecutor.Context context,
org.apache.hadoop.fs.Path source,
org.apache.hadoop.fs.Path target,
boolean recovery)
Move source to target
|
void |
move(ActionExecutor.Context context,
XConfiguration fsConf,
org.apache.hadoop.fs.Path nameNodePath,
org.apache.hadoop.fs.Path source,
org.apache.hadoop.fs.Path target,
boolean recovery)
Move source to target
|
void |
start(ActionExecutor.Context context,
WorkflowAction action)
Start an action.
|
boolean |
supportsConfigurationJobXML()
Returns true if this action type supports a Configuration and JobXML.
|
convertException, disableInit, enableInit, getActionDir, getActionDirPath, getActionSignal, getActionYarnTag, getMaxRetries, getOozieConf, getOozieRuntimeDir, getOozieSystemId, getRetryInterval, getRetryPolicy, getType, registerError, requiresNameNodeJobTracker, resetInitInfo, setMaxRetries, setRetryInterval, setRetryPolicypublic static final String ACTION_TYPE
public FsActionExecutor()
public void initActionType()
initActionType in class ActionExecutorpublic void delete(ActionExecutor.Context context, org.apache.hadoop.fs.Path path) throws ActionExecutorException
context - path - ActionExecutorExceptionpublic void delete(ActionExecutor.Context context, XConfiguration fsConf, org.apache.hadoop.fs.Path nameNodePath, org.apache.hadoop.fs.Path path, boolean skipTrash) throws ActionExecutorException
context - fsConf - nameNodePath - path - ActionExecutorExceptionpublic void delete(String user, String group, org.apache.hadoop.fs.Path path) throws ActionExecutorException
user - group - path - ActionExecutorExceptionpublic void move(ActionExecutor.Context context, org.apache.hadoop.fs.Path source, org.apache.hadoop.fs.Path target, boolean recovery) throws ActionExecutorException
context - source - target - recovery - ActionExecutorExceptionpublic void move(ActionExecutor.Context context, XConfiguration fsConf, org.apache.hadoop.fs.Path nameNodePath, org.apache.hadoop.fs.Path source, org.apache.hadoop.fs.Path target, boolean recovery) throws ActionExecutorException
context - fsConf - nameNodePath - source - target - recovery - ActionExecutorExceptionpublic 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 ActionExecutorcontext - 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 ActionExecutorcontext - executor context.action - the action to kill.ActionExecutorException - thrown if the action could not be killed.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 ActionExecutorcontext - 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 ActionExecutorcontext - executor context.action - the action to end.ActionExecutorException - thrown if the action could not end.public boolean isCompleted(String externalStatus)
ActionExecutorisCompleted in class ActionExecutorexternalStatus - external status to check.public org.apache.hadoop.fs.Path getRecoveryPath(ActionExecutor.Context context) throws HadoopAccessorException, IOException, URISyntaxException
context - HadoopAccessorExceptionIOExceptionURISyntaxExceptionpublic boolean supportsConfigurationJobXML()
ActionExecutorsupportsConfigurationJobXML in class ActionExecutorCopyright © 2018 Apache Software Foundation. All rights reserved.