|
@@ -154,7 +154,6 @@ public class JobClient extends Configured implements MRConstants, Tool {
|
|
private static final Log LOG = LogFactory.getLog(JobClient.class);
|
|
private static final Log LOG = LogFactory.getLog(JobClient.class);
|
|
public static enum TaskStatusFilter { NONE, KILLED, FAILED, SUCCEEDED, ALL }
|
|
public static enum TaskStatusFilter { NONE, KILLED, FAILED, SUCCEEDED, ALL }
|
|
private TaskStatusFilter taskOutputFilter = TaskStatusFilter.FAILED;
|
|
private TaskStatusFilter taskOutputFilter = TaskStatusFilter.FAILED;
|
|
- private static Configuration commandLineConfig;
|
|
|
|
static long MAX_JOBPROFILE_AGE = 1000 * 2;
|
|
static long MAX_JOBPROFILE_AGE = 1000 * 2;
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -398,24 +397,6 @@ public class JobClient extends Configured implements MRConstants, Tool {
|
|
init(conf);
|
|
init(conf);
|
|
}
|
|
}
|
|
|
|
|
|
- /**
|
|
|
|
- * set the command line config in the jobclient. these are
|
|
|
|
- * parameters paassed from the command line and stored in
|
|
|
|
- * conf
|
|
|
|
- * @param conf the configuration object to set.
|
|
|
|
- */
|
|
|
|
- static synchronized void setCommandLineConfig(Configuration conf) {
|
|
|
|
- commandLineConfig = conf;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- /**
|
|
|
|
- * return the command line configuration
|
|
|
|
- */
|
|
|
|
- public static synchronized Configuration getCommandLineConfig() {
|
|
|
|
- return commandLineConfig;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
-
|
|
|
|
/**
|
|
/**
|
|
* Connect to the default {@link JobTracker}.
|
|
* Connect to the default {@link JobTracker}.
|
|
* @param conf the job configuration.
|
|
* @param conf the job configuration.
|
|
@@ -541,8 +522,6 @@ public class JobClient extends Configured implements MRConstants, Tool {
|
|
private void configureCommandLineOptions(JobConf job, Path submitJobDir, Path submitJarFile)
|
|
private void configureCommandLineOptions(JobConf job, Path submitJobDir, Path submitJarFile)
|
|
throws IOException {
|
|
throws IOException {
|
|
|
|
|
|
- final String warning = "Use genericOptions for the option ";
|
|
|
|
-
|
|
|
|
if (!(job.getBoolean("mapred.used.genericoptionsparser", false))) {
|
|
if (!(job.getBoolean("mapred.used.genericoptionsparser", false))) {
|
|
LOG.warn("Use GenericOptionsParser for parsing the arguments. " +
|
|
LOG.warn("Use GenericOptionsParser for parsing the arguments. " +
|
|
"Applications should implement Tool for the same.");
|
|
"Applications should implement Tool for the same.");
|
|
@@ -550,41 +529,13 @@ public class JobClient extends Configured implements MRConstants, Tool {
|
|
|
|
|
|
// get all the command line arguments into the
|
|
// get all the command line arguments into the
|
|
// jobconf passed in by the user conf
|
|
// jobconf passed in by the user conf
|
|
- Configuration commandConf = JobClient.getCommandLineConfig();
|
|
|
|
String files = null;
|
|
String files = null;
|
|
String libjars = null;
|
|
String libjars = null;
|
|
String archives = null;
|
|
String archives = null;
|
|
|
|
|
|
files = job.get("tmpfiles");
|
|
files = job.get("tmpfiles");
|
|
- if (files == null) {
|
|
|
|
- if (commandConf != null) {
|
|
|
|
- files = commandConf.get("tmpfiles");
|
|
|
|
- if (files != null) {
|
|
|
|
- LOG.warn(warning + "-files");
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
libjars = job.get("tmpjars");
|
|
libjars = job.get("tmpjars");
|
|
- if (libjars == null) {
|
|
|
|
- if (commandConf != null) {
|
|
|
|
- libjars = commandConf.get("tmpjars");
|
|
|
|
- if (libjars != null) {
|
|
|
|
- LOG.warn(warning + "-libjars");
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
archives = job.get("tmparchives");
|
|
archives = job.get("tmparchives");
|
|
- if (archives == null) {
|
|
|
|
- if (commandConf != null) {
|
|
|
|
- archives = commandConf.get("tmparchives");
|
|
|
|
- if (archives != null) {
|
|
|
|
- LOG.warn(warning + "-archives");
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
/*
|
|
/*
|
|
* set this user's id in job configuration, so later job files can be
|
|
* set this user's id in job configuration, so later job files can be
|
|
* accessed using this user's id
|
|
* accessed using this user's id
|