org.apache.oozie.action
Interface ActionExecutor.Context

All Known Implementing Classes:
ActionXCommand.ActionExecutorContext
Enclosing class:
ActionExecutor

public static interface ActionExecutor.Context

Context information passed to the ActionExecutor methods.


Method Summary
 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.
 org.apache.oozie.client.WorkflowJob getWorkflow()
          Return the workflow job.
 boolean isRetry()
          Return if the executor invocation is a retry or not.
 void setEndData(org.apache.oozie.client.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.
 

Method Detail

getCallbackUrl

String getCallbackUrl(String externalStatusVar)
Create the callback URL for the action.

Parameters:
externalStatusVar - variable for the caller to inject the external status.
Returns:
the callback URL.

getProtoActionConf

org.apache.hadoop.conf.Configuration getProtoActionConf()
Return a proto configuration for actions with auth properties already set.

Returns:
a proto configuration for actions with auth properties already set.

getWorkflow

org.apache.oozie.client.WorkflowJob getWorkflow()
Return the workflow job.

Returns:
the workflow job.

getELEvaluator

ELEvaluator getELEvaluator()
Return an ELEvaluator with the context injected.

Returns:
configured ELEvaluator.

setVar

void setVar(String name,
            String value)
Set a workflow action variable.

Convenience method that prefixes the variable name with the action name plus a '.'.

Parameters:
name - variable name.
value - variable value, null removes the variable.

getVar

String getVar(String name)
Get a workflow action variable.

Convenience method that prefixes the variable name with the action name plus a '.'.

Parameters:
name - variable name.
Returns:
the variable value, null if not set.

setStartData

void setStartData(String externalId,
                  String trackerUri,
                  String consoleUrl)
Set the action tracking information for an successfully started action.

Parameters:
externalId - the action external ID.
trackerUri - the action tracker URI.
consoleUrl - the action console URL.

setExecutionData

void setExecutionData(String externalStatus,
                      Properties actionData)
Set the action execution completion information for an action. The action status is set to WorkflowAction.Status.DONE

Parameters:
externalStatus - the action external end status.
actionData - the action data on completion, null if none.

setExecutionStats

void setExecutionStats(String jsonStats)
Set execution statistics information for a particular action. The action status is set to WorkflowAction.Status.DONE

Parameters:
jsonStats - the JSON string representation of the stats.

setExternalChildIDs

void setExternalChildIDs(String externalChildIDs)
Set external child IDs for a particular action (Eg: pig). The action status is set to WorkflowAction.Status.DONE

Parameters:
externalChildIDs - the external child IDs as a comma-delimited string.

setEndData

void setEndData(org.apache.oozie.client.WorkflowAction.Status status,
                String signalValue)
Set the action end completion information for a completed action.

Parameters:
status - the action end status, it can be WorkflowAction.Status.OK or WorkflowAction.Status.ERROR.
signalValue - the action external end status.

isRetry

boolean isRetry()
Return if the executor invocation is a retry or not.

Returns:
if the executor invocation is a retry or not.

setExternalStatus

void setExternalStatus(String externalStatus)
Sets the external status for the action in context.

Parameters:
externalStatus - the external status.

getRecoveryId

String getRecoveryId()
Get the Action Recovery ID.

Returns:
recovery ID.

getActionDir

org.apache.hadoop.fs.Path getActionDir()
                                       throws HadoopAccessorException,
                                              IOException,
                                              URISyntaxException
Throws:
HadoopAccessorException
IOException
URISyntaxException

getAppFileSystem

org.apache.hadoop.fs.FileSystem getAppFileSystem()
                                                 throws HadoopAccessorException,
                                                        IOException,
                                                        URISyntaxException
Returns:
filesystem handle for the application deployment fs.
Throws:
IOException
URISyntaxException
HadoopAccessorException

setErrorInfo

void setErrorInfo(String str,
                  String exMsg)


Copyright © 2013 Apache Software Foundation. All Rights Reserved.