public class EmailActionExecutor extends ActionExecutor
| Modifier and Type | Class and Description |
|---|---|
static class |
EmailActionExecutor.JavaMailAuthenticator |
ActionExecutor.Context| Modifier and Type | Field and Description |
|---|---|
static String |
CONF_PREFIX |
static String |
EMAIL_SMTP_AUTH |
static String |
EMAIL_SMTP_FROM |
static String |
EMAIL_SMTP_HOST |
static String |
EMAIL_SMTP_PASS |
static String |
EMAIL_SMTP_PORT |
static String |
EMAIL_SMTP_USER |
ERROR_OTHER, MAX_RETRIES, requiresNNJT, RETRY_INTERVAL| Constructor and Description |
|---|
EmailActionExecutor() |
| Modifier and Type | Method and Description |
|---|---|
void |
check(ActionExecutor.Context context,
org.apache.oozie.client.WorkflowAction action)
Check if an action has completed.
|
protected void |
email(ActionExecutor.Context context,
String[] to,
String[] cc,
String subject,
String body,
String contentType) |
void |
end(ActionExecutor.Context context,
org.apache.oozie.client.WorkflowAction action)
End an action after it has executed.
|
void |
initActionType()
Invoked once at system initialization time.
|
boolean |
isCompleted(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.
|
protected void |
validateAndMail(ActionExecutor.Context context,
org.jdom.Element element) |
convertException, disableInit, enableInit, getActionDir, getActionDirPath, getActionSignal, getMaxRetries, getOozieConf, getOozieRuntimeDir, getOozieSystemId, getRetryInterval, getType, registerError, resetInitInfo, setMaxRetries, setRetryIntervalpublic static final String CONF_PREFIX
public static final String EMAIL_SMTP_HOST
public static final String EMAIL_SMTP_PORT
public static final String EMAIL_SMTP_AUTH
public static final String EMAIL_SMTP_USER
public static final String EMAIL_SMTP_PASS
public static final String EMAIL_SMTP_FROM
public EmailActionExecutor()
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 ActionExecutorpublic 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.protected void validateAndMail(ActionExecutor.Context context, org.jdom.Element element) throws ActionExecutorException
ActionExecutorExceptionprotected void email(ActionExecutor.Context context, String[] to, String[] cc, String subject, String body, String contentType) throws ActionExecutorException
ActionExecutorExceptionpublic 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(String externalStatus)
ActionExecutorisCompleted in class ActionExecutorexternalStatus - external status to check.Copyright © 2014 Apache Software Foundation. All Rights Reserved.