public static interface ActionExecutor.Context
Modifier and Type | Method and Description |
---|---|
org.apache.hadoop.fs.Path |
getActionDir() |
org.apache.hadoop.fs.FileSystem |
getAppFileSystem() |
String |
getCallbackUrl(String externalStatusVar)
Create the callback URL for the action.
|
ELEvaluator |
getELEvaluator()
Return an ELEvaluator with the context injected.
|
org.apache.hadoop.conf.Configuration |
getProtoActionConf()
Return a proto configuration for actions with auth properties already set.
|
String |
getRecoveryId()
Get the Action Recovery ID.
|
String |
getVar(String name)
Get a workflow action variable.
|
WorkflowJob |
getWorkflow()
Return the workflow job.
|
boolean |
isRetry()
Return if the executor invocation is a retry or not.
|
void |
setEndData(WorkflowAction.Status status,
String signalValue)
Set the action end completion information for a completed action.
|
void |
setErrorInfo(String str,
String exMsg) |
void |
setExecutionData(String externalStatus,
Properties actionData)
Set the action execution completion information for an action.
|
void |
setExecutionStats(String jsonStats)
Set execution statistics information for a particular action.
|
void |
setExternalChildIDs(String externalChildIDs)
Set external child IDs for a particular action (Eg: pig).
|
void |
setExternalStatus(String externalStatus)
Sets the external status for the action in context.
|
void |
setStartData(String externalId,
String trackerUri,
String consoleUrl)
Set the action tracking information for an successfully started action.
|
void |
setVar(String name,
String value)
Set a workflow action variable.
|
String getCallbackUrl(String externalStatusVar)
externalStatusVar
- variable for the caller to inject the external status.org.apache.hadoop.conf.Configuration getProtoActionConf()
WorkflowJob getWorkflow()
ELEvaluator getELEvaluator()
void setVar(String name, String value)
Convenience method that prefixes the variable name with the action name plus a '.'.
name
- variable name.value
- variable value, null
removes the variable.String getVar(String name)
Convenience method that prefixes the variable name with the action name plus a '.'.
name
- variable name.null
if not set.void setStartData(String externalId, String trackerUri, String consoleUrl)
externalId
- the action external ID.trackerUri
- the action tracker URI.consoleUrl
- the action console URL.void setExecutionData(String externalStatus, Properties actionData)
WorkflowAction.Status.DONE
externalStatus
- the action external end status.actionData
- the action data on completion, null
if none.void setExecutionStats(String jsonStats)
WorkflowAction.Status.DONE
jsonStats
- the JSON string representation of the stats.void setExternalChildIDs(String externalChildIDs)
WorkflowAction.Status.DONE
externalChildIDs
- the external child IDs as a comma-delimited string.void setEndData(WorkflowAction.Status status, String signalValue)
status
- the action end status, it can be WorkflowAction.Status.OK
or
WorkflowAction.Status.ERROR
.signalValue
- the action external end status.boolean isRetry()
void setExternalStatus(String externalStatus)
externalStatus
- the external status.String getRecoveryId()
org.apache.hadoop.fs.Path getActionDir() throws HadoopAccessorException, IOException, URISyntaxException
org.apache.hadoop.fs.FileSystem getAppFileSystem() throws HadoopAccessorException, IOException, URISyntaxException
IOException
URISyntaxException
HadoopAccessorException
void setErrorInfo(String str, String exMsg)
Copyright © 2018 Apache Software Foundation. All rights reserved.