public class MapReduceActionExecutor extends JavaActionExecutor
ActionExecutor.Context, ActionExecutor.RETRYPOLICY
Modifier and Type | Field and Description |
---|---|
static String |
HADOOP_COUNTERS |
static String |
JOB_END_NOTIFICATION_URL |
static String |
OOZIE_ACTION_EXTERNAL_STATS_WRITE |
static String |
OOZIE_MAPREDUCE_UBER_JAR_ENABLE |
ACL_MODIFY_JOB, ACL_VIEW_JOB, DEFAULT_LAUNCHER_MAX_ATTEMPS, DEFAULT_LAUNCHER_MEMORY_MB, DEFAULT_LAUNCHER_PRIORITY, DEFAULT_LAUNCHER_QUEUE, DEFAULT_LAUNCHER_VCORES, FAILED, FAILED_KILLED, HADOOP_CHILD_JAVA_ENV, HADOOP_CHILD_JAVA_OPTS, HADOOP_JOB_CLASSLOADER, HADOOP_MAP_JAVA_ENV, HADOOP_MAP_JAVA_OPTS, HADOOP_MAP_MEMORY_MB, HADOOP_NAME_NODE, HADOOP_REDUCE_JAVA_OPTS, HADOOP_USER, HADOOP_USER_CLASSPATH_FIRST, HADOOP_YARN_KILL_CHILD_JOBS_ON_AMRESTART, HADOOP_YARN_RM, HADOOP_YARN_TIMELINE_SERVICE_ENABLED, HADOOP_YARN_UBER_MODE, KILLED, LAUNCER_MODIFY_ACL, LAUNCER_VIEW_ACL, LOG, MAPREDUCE_TO_CLASSPATH, MAX_EXTERNAL_STATS_SIZE, OOZIE_ACTION_LAUNCHER_PREFIX, OOZIE_COMMON_LIBDIR, OOZIE_CREDENTIALS_SKIP, OOZIE_LAUNCHER_ADD_MAPREDUCE_TO_CLASSPATH_PROPERTY, RUNNING, SUCCEEDED, workflowConf, YARN_AM_COMMAND_OPTS, YARN_AM_ENV, YARN_AM_RESOURCE_MB, YARN_MEMORY_MB_MIN
ACTION_RETRY_INTERVAL, ACTION_RETRY_POLICY, CONF_PREFIX, ERROR_OTHER, MAX_RETRIES, OOZIE_ACTION_YARN_TAG, RETRY_INTERVAL
Constructor and Description |
---|
MapReduceActionExecutor() |
Modifier and Type | Method and Description |
---|---|
void |
check(ActionExecutor.Context context,
WorkflowAction action)
Check if an action has completed.
|
protected org.apache.hadoop.conf.Configuration |
createBaseHadoopConf(ActionExecutor.Context context,
org.jdom.Element actionXml,
boolean loadResources) |
void |
end(ActionExecutor.Context context,
WorkflowAction action)
End an action after it has executed.
|
protected String |
getActualExternalId(WorkflowAction action)
Useful for overriding in actions that do subsequent job runs
such as the MapReduce Action, where the launcher job is not the
actual job that then gets monitored.
|
protected String |
getDefaultShareLibName(org.jdom.Element actionXml)
Return the sharelib name for the action.
|
List<Class<?>> |
getLauncherClasses() |
protected String |
getLauncherMain(org.apache.hadoop.conf.Configuration launcherConf,
org.jdom.Element actionXml) |
protected void |
injectCallback(ActionExecutor.Context context,
org.apache.hadoop.conf.Configuration conf) |
static void |
setStreaming(org.apache.hadoop.conf.Configuration conf,
String mapper,
String reducer,
String recordReader,
String[] recordReaderMapping,
String[] env) |
addActionLibs, addActionSpecificEnvVars, addAppNameContext, addShareLib, addSystemShareLibForAction, createBaseHadoopConf, createJobClient, createYarnClient, getActionCredentialsProperties, getActionData, getAppName, getCaptureOutput, getCommonLauncherClasses, getCredProperties, getMaxExternalStatsSize, getMaxOutputData, getShareLibFilesForActionConf, getShareLibNames, getTrimmedEncodedPath, initActionType, isCompleted, kill, loadHadoopDefaultResources, parseJobXmlAndConfiguration, parseJobXmlAndConfiguration, prepareActionDir, requiresNameNodeJobTracker, setActionCompletionData, setActionTokenProperties, setCredentialTokens, setLibFilesArchives, start, submitLauncher, supportsConfigurationJobXML
convertException, disableInit, enableInit, getActionDir, getActionDirPath, getActionSignal, getActionYarnTag, getMaxRetries, getOozieConf, getOozieRuntimeDir, getOozieSystemId, getRetryInterval, getRetryPolicy, getType, registerError, resetInitInfo, setMaxRetries, setRetryInterval, setRetryPolicy
public static final String OOZIE_ACTION_EXTERNAL_STATS_WRITE
public static final String HADOOP_COUNTERS
public static final String OOZIE_MAPREDUCE_UBER_JAR_ENABLE
public static final String JOB_END_NOTIFICATION_URL
public MapReduceActionExecutor()
public List<Class<?>> getLauncherClasses()
getLauncherClasses
in class JavaActionExecutor
protected String getActualExternalId(WorkflowAction action)
JavaActionExecutor
getActualExternalId
in class JavaActionExecutor
protected String getLauncherMain(org.apache.hadoop.conf.Configuration launcherConf, org.jdom.Element actionXml)
getLauncherMain
in class JavaActionExecutor
protected org.apache.hadoop.conf.Configuration createBaseHadoopConf(ActionExecutor.Context context, org.jdom.Element actionXml, boolean loadResources)
createBaseHadoopConf
in class JavaActionExecutor
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 JavaActionExecutor
context
- executor context.action
- the action to end.ActionExecutorException
- thrown if the action could not end.protected String getDefaultShareLibName(org.jdom.Element actionXml)
getDefaultShareLibName
in class JavaActionExecutor
actionXml
- streaming
if mapreduce-streaming action, NULL
otherwise.public static void setStreaming(org.apache.hadoop.conf.Configuration conf, String mapper, String reducer, String recordReader, String[] recordReaderMapping, String[] env)
protected void injectCallback(ActionExecutor.Context context, org.apache.hadoop.conf.Configuration conf)
injectCallback
in class JavaActionExecutor
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 JavaActionExecutor
context
- executor context.action
- the action to end.ActionExecutorException
- thrown if the action could not be checked.Copyright © 2018 Apache Software Foundation. All rights reserved.