org.apache.oozie.action.hadoop
Class MapReduceActionExecutor

java.lang.Object
  extended by org.apache.oozie.action.ActionExecutor
      extended by org.apache.oozie.action.hadoop.JavaActionExecutor
          extended by org.apache.oozie.action.hadoop.MapReduceActionExecutor

public class MapReduceActionExecutor
extends JavaActionExecutor


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.oozie.action.ActionExecutor
ActionExecutor.Context
 
Field Summary
static String HADOOP_COUNTERS
           
static String OOZIE_ACTION_EXTERNAL_STATS_WRITE
           
static String OOZIE_MAPREDUCE_UBER_JAR_ENABLE
           
 
Fields inherited from class org.apache.oozie.action.hadoop.JavaActionExecutor
ACL_MODIFY_JOB, ACL_VIEW_JOB, HADOOP_JOB_TRACKER, HADOOP_JOB_TRACKER_2, HADOOP_NAME_NODE, HADOOP_YARN_RM, MAX_EXTERNAL_STATS_SIZE, MAX_EXTERNAL_STATS_SIZE_DEFAULT, OOZIE_ACTION_SHIP_LAUNCHER_JAR, OOZIE_COMMON_LIBDIR
 
Fields inherited from class org.apache.oozie.action.ActionExecutor
CONF_PREFIX, ERROR_OTHER, MAX_RETRIES, requiresNNJT, RETRY_INTERVAL
 
Constructor Summary
MapReduceActionExecutor()
           
 
Method Summary
 void end(ActionExecutor.Context context, org.apache.oozie.client.WorkflowAction action)
          End an action after it has executed.
protected  String getDefaultShareLibName(org.jdom.Element actionXml)
          Return the sharelib name for the action.
protected  List<Class> getLauncherClasses()
           
protected  String getLauncherMain(org.apache.hadoop.conf.Configuration launcherConf, org.jdom.Element actionXml)
           
protected  org.apache.hadoop.mapred.RunningJob getRunningJob(ActionExecutor.Context context, org.apache.oozie.client.WorkflowAction action, org.apache.hadoop.mapred.JobClient jobClient)
           
static void setStreaming(org.apache.hadoop.conf.Configuration conf, String mapper, String reducer, String recordReader, String[] recordReaderMapping, String[] env)
           
 
Methods inherited from class org.apache.oozie.action.hadoop.JavaActionExecutor
addActionLibs, addShareLib, check, createBaseHadoopConf, createJobClient, createLauncherJar, getActionCredentialsProperties, getActionData, getCaptureOutput, getCredProperties, getLauncherJarName, getMaxExternalStatsSize, getShareLibNames, initActionType, isCompleted, kill, parseJobXmlAndConfiguration, prepareActionDir, setActionCompletionData, setCredentialPropertyToActionConf, setCredentialTokens, start, submitLauncher
 
Methods inherited from class org.apache.oozie.action.ActionExecutor
convertException, disableInit, enableInit, getActionDir, getActionDirPath, getActionSignal, getMaxRetries, getOozieConf, getOozieRuntimeDir, getOozieSystemId, getRetryInterval, getType, registerError, resetInitInfo, setMaxRetries, setRetryInterval
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OOZIE_ACTION_EXTERNAL_STATS_WRITE

public static final String OOZIE_ACTION_EXTERNAL_STATS_WRITE
See Also:
Constant Field Values

HADOOP_COUNTERS

public static final String HADOOP_COUNTERS
See Also:
Constant Field Values

OOZIE_MAPREDUCE_UBER_JAR_ENABLE

public static final String OOZIE_MAPREDUCE_UBER_JAR_ENABLE
See Also:
Constant Field Values
Constructor Detail

MapReduceActionExecutor

public MapReduceActionExecutor()
Method Detail

getLauncherClasses

protected List<Class> getLauncherClasses()
Overrides:
getLauncherClasses in class JavaActionExecutor

getLauncherMain

protected String getLauncherMain(org.apache.hadoop.conf.Configuration launcherConf,
                                 org.jdom.Element actionXml)
Overrides:
getLauncherMain in class JavaActionExecutor

end

public void end(ActionExecutor.Context context,
                org.apache.oozie.client.WorkflowAction action)
         throws ActionExecutorException
Description copied from class: ActionExecutor
End an action after it has executed.

The ActionExecutor.Context.setEndData(org.apache.oozie.client.WorkflowAction.Status, java.lang.String) method must be called within this method.

Overrides:
end in class JavaActionExecutor
Parameters:
context - executor context.
action - the action to end.
Throws:
ActionExecutorException - thrown if the action could not end.

getDefaultShareLibName

protected String getDefaultShareLibName(org.jdom.Element actionXml)
Return the sharelib name for the action.

Overrides:
getDefaultShareLibName in class JavaActionExecutor
Parameters:
actionXml -
Returns:
returns streaming if mapreduce-streaming action, NULL otherwise.

setStreaming

public static void setStreaming(org.apache.hadoop.conf.Configuration conf,
                                String mapper,
                                String reducer,
                                String recordReader,
                                String[] recordReaderMapping,
                                String[] env)

getRunningJob

protected org.apache.hadoop.mapred.RunningJob getRunningJob(ActionExecutor.Context context,
                                                            org.apache.oozie.client.WorkflowAction action,
                                                            org.apache.hadoop.mapred.JobClient jobClient)
                                                     throws Exception
Overrides:
getRunningJob in class JavaActionExecutor
Throws:
Exception


Copyright © 2013 Apache Software Foundation. All Rights Reserved.