org.apache.oozie.action.hadoop
Class LauncherMapperHelper

java.lang.Object
  extended by org.apache.oozie.action.hadoop.LauncherMapperHelper

public class LauncherMapperHelper
extends Object


Constructor Summary
LauncherMapperHelper()
           
 
Method Summary
static Map<String,String> getActionData(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path actionDir, org.apache.hadoop.conf.Configuration conf)
          Utility function to load the contents of action data sequence file into memory object
static org.apache.hadoop.fs.Path getActionDataSequenceFilePath(org.apache.hadoop.fs.Path actionDir)
          Get the sequence file path storing all action data
static String getRecoveryId(org.apache.hadoop.conf.Configuration launcherConf, org.apache.hadoop.fs.Path actionDir, String recoveryId)
           
static boolean hasExternalChildJobs(Map<String,String> actionData)
          Determine whether action has external child jobs or not
static boolean hasIdSwap(Map<String,String> actionData)
          Determine whether action has new id (id swap) or not
static boolean hasOutputData(Map<String,String> actionData)
          Determine whether action has output data or not
static boolean hasStatsData(Map<String,String> actionData)
          Determine whether action has external stats or not
static boolean isMainDone(org.apache.hadoop.mapred.RunningJob runningJob)
           
static boolean isMainSuccessful(org.apache.hadoop.mapred.RunningJob runningJob)
           
static void setupLauncherInfo(org.apache.hadoop.mapred.JobConf launcherConf, String jobId, String actionId, org.apache.hadoop.fs.Path actionDir, String recoveryId, org.apache.hadoop.conf.Configuration actionConf, String prepareXML)
           
static void setupLauncherURIHandlerConf(org.apache.hadoop.conf.Configuration launcherConf)
           
static void setupMainArguments(org.apache.hadoop.conf.Configuration launcherConf, String[] args)
           
static void setupMainClass(org.apache.hadoop.conf.Configuration launcherConf, String javaMainClass)
           
static void setupMaxExternalStatsSize(org.apache.hadoop.conf.Configuration launcherConf, int maxStatsData)
          Set the maximum value of stats data
static void setupMaxFSGlob(org.apache.hadoop.conf.Configuration launcherConf, int fsGlobMax)
          Set the maximum number of globbed files/dirs
static void setupMaxOutputData(org.apache.hadoop.conf.Configuration launcherConf, int maxOutputData)
           
static void setupYarnRestartHandling(org.apache.hadoop.mapred.JobConf launcherJobConf, org.apache.hadoop.conf.Configuration actionConf, String actionId)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LauncherMapperHelper

public LauncherMapperHelper()
Method Detail

getRecoveryId

public static String getRecoveryId(org.apache.hadoop.conf.Configuration launcherConf,
                                   org.apache.hadoop.fs.Path actionDir,
                                   String recoveryId)
                            throws HadoopAccessorException,
                                   IOException
Throws:
HadoopAccessorException
IOException

setupMainClass

public static void setupMainClass(org.apache.hadoop.conf.Configuration launcherConf,
                                  String javaMainClass)

setupLauncherURIHandlerConf

public static void setupLauncherURIHandlerConf(org.apache.hadoop.conf.Configuration launcherConf)

setupMainArguments

public static void setupMainArguments(org.apache.hadoop.conf.Configuration launcherConf,
                                      String[] args)

setupMaxOutputData

public static void setupMaxOutputData(org.apache.hadoop.conf.Configuration launcherConf,
                                      int maxOutputData)

setupMaxExternalStatsSize

public static void setupMaxExternalStatsSize(org.apache.hadoop.conf.Configuration launcherConf,
                                             int maxStatsData)
Set the maximum value of stats data

Parameters:
launcherConf - the oozie launcher configuration
maxStatsData - the maximum allowed size of stats data

setupMaxFSGlob

public static void setupMaxFSGlob(org.apache.hadoop.conf.Configuration launcherConf,
                                  int fsGlobMax)
Set the maximum number of globbed files/dirs

Parameters:
launcherConf - the oozie launcher configuration
fsGlobMax - the maximum number of files/dirs for FS operation

setupLauncherInfo

public static void setupLauncherInfo(org.apache.hadoop.mapred.JobConf launcherConf,
                                     String jobId,
                                     String actionId,
                                     org.apache.hadoop.fs.Path actionDir,
                                     String recoveryId,
                                     org.apache.hadoop.conf.Configuration actionConf,
                                     String prepareXML)
                              throws IOException,
                                     HadoopAccessorException
Throws:
IOException
HadoopAccessorException

setupYarnRestartHandling

public static void setupYarnRestartHandling(org.apache.hadoop.mapred.JobConf launcherJobConf,
                                            org.apache.hadoop.conf.Configuration actionConf,
                                            String actionId)
                                     throws NoSuchAlgorithmException
Throws:
NoSuchAlgorithmException

isMainDone

public static boolean isMainDone(org.apache.hadoop.mapred.RunningJob runningJob)
                          throws IOException
Throws:
IOException

isMainSuccessful

public static boolean isMainSuccessful(org.apache.hadoop.mapred.RunningJob runningJob)
                                throws IOException
Throws:
IOException

hasExternalChildJobs

public static boolean hasExternalChildJobs(Map<String,String> actionData)
                                    throws IOException
Determine whether action has external child jobs or not

Parameters:
actionData -
Returns:
true/false
Throws:
IOException

hasOutputData

public static boolean hasOutputData(Map<String,String> actionData)
                             throws IOException
Determine whether action has output data or not

Parameters:
actionData -
Returns:
true/false
Throws:
IOException

hasStatsData

public static boolean hasStatsData(Map<String,String> actionData)
                            throws IOException
Determine whether action has external stats or not

Parameters:
actionData -
Returns:
true/false
Throws:
IOException

hasIdSwap

public static boolean hasIdSwap(Map<String,String> actionData)
                         throws IOException
Determine whether action has new id (id swap) or not

Parameters:
actionData -
Returns:
true/false
Throws:
IOException

getActionDataSequenceFilePath

public static org.apache.hadoop.fs.Path getActionDataSequenceFilePath(org.apache.hadoop.fs.Path actionDir)
Get the sequence file path storing all action data

Parameters:
actionDir -
Returns:

getActionData

public static Map<String,String> getActionData(org.apache.hadoop.fs.FileSystem fs,
                                               org.apache.hadoop.fs.Path actionDir,
                                               org.apache.hadoop.conf.Configuration conf)
                                        throws IOException,
                                               InterruptedException
Utility function to load the contents of action data sequence file into memory object

Parameters:
fs - Action Filesystem
actionDir - Path
conf - Configuration
Returns:
Map action data
Throws:
IOException
InterruptedException


Copyright © 2015 Apache Software Foundation. All Rights Reserved.