This project has retired. For details please refer to its
Attic page.
LauncherMapper (Oozie Core 3.1.3-incubating API)
org.apache.oozie.action.hadoop
Class LauncherMapper<K1,V1,K2,V2>
java.lang.Object
org.apache.oozie.action.hadoop.LauncherMapper<K1,V1,K2,V2>
- All Implemented Interfaces:
- Closeable, Runnable, org.apache.hadoop.mapred.JobConfigurable, org.apache.hadoop.mapred.Mapper<K1,V1,K2,V2>
public class LauncherMapper<K1,V1,K2,V2>
- extends Object
- implements org.apache.hadoop.mapred.Mapper<K1,V1,K2,V2>, Runnable
Method Summary |
void |
close()
|
void |
configure(org.apache.hadoop.mapred.JobConf jobConf)
|
static org.apache.hadoop.fs.Path |
getErrorPath(org.apache.hadoop.fs.Path actionDir)
|
static org.apache.hadoop.fs.Path |
getIdSwapPath(org.apache.hadoop.fs.Path actionDir)
|
protected org.apache.hadoop.mapred.JobConf |
getJobConf()
|
static String[] |
getMainArguments(org.apache.hadoop.conf.Configuration conf)
|
static org.apache.hadoop.fs.Path |
getOutputDataPath(org.apache.hadoop.fs.Path actionDir)
|
static String |
getRecoveryId(org.apache.hadoop.conf.Configuration launcherConf,
org.apache.hadoop.fs.Path actionDir,
String recoveryId)
|
static boolean |
hasIdSwap(org.apache.hadoop.mapred.RunningJob runningJob)
|
static boolean |
hasIdSwap(org.apache.hadoop.mapred.RunningJob runningJob,
String user,
String group,
org.apache.hadoop.fs.Path actionDir)
|
static boolean |
hasOutputData(org.apache.hadoop.mapred.RunningJob runningJob)
|
static boolean |
isMainDone(org.apache.hadoop.mapred.RunningJob runningJob)
|
static boolean |
isMainSuccessful(org.apache.hadoop.mapred.RunningJob runningJob)
|
void |
map(K1 key,
V1 value,
org.apache.hadoop.mapred.OutputCollector<K2,V2> collector,
org.apache.hadoop.mapred.Reporter reporter)
|
protected void |
printContentsOfCurrentDir()
Print files and directories in current directory. |
void |
run()
|
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)
|
static void |
setupMainArguments(org.apache.hadoop.conf.Configuration launcherConf,
String[] args)
|
static void |
setupMainClass(org.apache.hadoop.conf.Configuration launcherConf,
String javaMainClass)
|
static void |
setupMaxOutputData(org.apache.hadoop.conf.Configuration launcherConf,
int maxOutputData)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CONF_OOZIE_ACTION_MAIN_CLASS
public static final String CONF_OOZIE_ACTION_MAIN_CLASS
- See Also:
- Constant Field Values
LauncherMapper
public LauncherMapper()
getRecoveryId
public static String getRecoveryId(org.apache.hadoop.conf.Configuration launcherConf,
org.apache.hadoop.fs.Path actionDir,
String recoveryId)
throws HadoopAccessorException,
IOException
- Parameters:
launcherConf
- actionDir
- recoveryId
-
- Returns:
-
- Throws:
HadoopAccessorException
IOException
setupMainClass
public static void setupMainClass(org.apache.hadoop.conf.Configuration launcherConf,
String javaMainClass)
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)
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)
throws IOException,
HadoopAccessorException
- Parameters:
launcherConf
- jobId
- actionId
- actionDir
- recoveryId
- actionConf
-
- Throws:
IOException
HadoopAccessorException
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
hasOutputData
public static boolean hasOutputData(org.apache.hadoop.mapred.RunningJob runningJob)
throws IOException
- Throws:
IOException
hasIdSwap
public static boolean hasIdSwap(org.apache.hadoop.mapred.RunningJob runningJob)
throws IOException
- Parameters:
runningJob
-
- Returns:
-
- Throws:
IOException
hasIdSwap
public static boolean hasIdSwap(org.apache.hadoop.mapred.RunningJob runningJob,
String user,
String group,
org.apache.hadoop.fs.Path actionDir)
throws IOException,
HadoopAccessorException
- Parameters:
runningJob
- user
- group
- actionDir
-
- Returns:
-
- Throws:
IOException
HadoopAccessorException
getOutputDataPath
public static org.apache.hadoop.fs.Path getOutputDataPath(org.apache.hadoop.fs.Path actionDir)
getErrorPath
public static org.apache.hadoop.fs.Path getErrorPath(org.apache.hadoop.fs.Path actionDir)
getIdSwapPath
public static org.apache.hadoop.fs.Path getIdSwapPath(org.apache.hadoop.fs.Path actionDir)
configure
public void configure(org.apache.hadoop.mapred.JobConf jobConf)
- Specified by:
configure
in interface org.apache.hadoop.mapred.JobConfigurable
map
public void map(K1 key,
V1 value,
org.apache.hadoop.mapred.OutputCollector<K2,V2> collector,
org.apache.hadoop.mapred.Reporter reporter)
throws IOException
- Specified by:
map
in interface org.apache.hadoop.mapred.Mapper<K1,V1,K2,V2>
- Throws:
IOException
close
public void close()
throws IOException
- Specified by:
close
in interface Closeable
- Throws:
IOException
getJobConf
protected org.apache.hadoop.mapred.JobConf getJobConf()
getMainArguments
public static String[] getMainArguments(org.apache.hadoop.conf.Configuration conf)
run
public void run()
- Specified by:
run
in interface Runnable
printContentsOfCurrentDir
protected void printContentsOfCurrentDir()
- Print files and directories in current directory. Will list files in the sub-directory (only 1 level deep)
Copyright © 2012 Apache Software Foundation. All Rights Reserved.