public class LauncherHelper extends Object
Modifier and Type | Field and Description |
---|---|
static String |
OOZIE_ACTION_YARN_TAG |
Constructor and Description |
---|
LauncherHelper() |
Modifier and Type | Method and Description |
---|---|
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 |
getActionYarnTag(org.apache.hadoop.conf.Configuration conf,
String parentId,
WorkflowAction wfAction) |
static String |
getRecoveryId(org.apache.hadoop.conf.Configuration launcherConf,
org.apache.hadoop.fs.Path actionDir,
String recoveryId) |
static String |
getTag(String launcherTag) |
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.conf.Configuration 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.conf.Configuration launcherJobConf,
org.apache.hadoop.conf.Configuration actionConf,
String launcherTag,
long launcherTime) |
public static final String OOZIE_ACTION_YARN_TAG
public LauncherHelper()
public static String getRecoveryId(org.apache.hadoop.conf.Configuration launcherConf, org.apache.hadoop.fs.Path actionDir, String recoveryId) throws HadoopAccessorException, IOException
HadoopAccessorException
IOException
public static void setupMainClass(org.apache.hadoop.conf.Configuration launcherConf, String javaMainClass)
public static void setupLauncherURIHandlerConf(org.apache.hadoop.conf.Configuration launcherConf)
public static void setupMainArguments(org.apache.hadoop.conf.Configuration launcherConf, String[] args)
public static void setupMaxOutputData(org.apache.hadoop.conf.Configuration launcherConf, int maxOutputData)
public static void setupMaxExternalStatsSize(org.apache.hadoop.conf.Configuration launcherConf, int maxStatsData)
launcherConf
- the oozie launcher configurationmaxStatsData
- the maximum allowed size of stats datapublic static void setupMaxFSGlob(org.apache.hadoop.conf.Configuration launcherConf, int fsGlobMax)
launcherConf
- the oozie launcher configurationfsGlobMax
- the maximum number of files/dirs for FS operationpublic static void setupLauncherInfo(org.apache.hadoop.conf.Configuration launcherConf, String jobId, String actionId, org.apache.hadoop.fs.Path actionDir, String recoveryId, org.apache.hadoop.conf.Configuration actionConf, String prepareXML) throws IOException, HadoopAccessorException
IOException
HadoopAccessorException
public static void setupYarnRestartHandling(org.apache.hadoop.conf.Configuration launcherJobConf, org.apache.hadoop.conf.Configuration actionConf, String launcherTag, long launcherTime) throws NoSuchAlgorithmException
NoSuchAlgorithmException
public static String getTag(String launcherTag) throws NoSuchAlgorithmException
NoSuchAlgorithmException
public static boolean isMainDone(org.apache.hadoop.mapred.RunningJob runningJob) throws IOException
IOException
public static boolean isMainSuccessful(org.apache.hadoop.mapred.RunningJob runningJob) throws IOException
IOException
public static boolean hasExternalChildJobs(Map<String,String> actionData) throws IOException
actionData
- IOException
public static boolean hasOutputData(Map<String,String> actionData) throws IOException
actionData
- IOException
public static boolean hasStatsData(Map<String,String> actionData) throws IOException
actionData
- IOException
public static boolean hasIdSwap(Map<String,String> actionData) throws IOException
actionData
- IOException
public static org.apache.hadoop.fs.Path getActionDataSequenceFilePath(org.apache.hadoop.fs.Path actionDir)
actionDir
- 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
fs
- Action FilesystemactionDir
- Pathconf
- ConfigurationIOException
InterruptedException
public static String getActionYarnTag(org.apache.hadoop.conf.Configuration conf, String parentId, WorkflowAction wfAction)
Copyright © 2018 Apache Software Foundation. All rights reserved.