You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by cd...@apache.org on 2008/11/25 10:25:59 UTC
svn commit: r720448 - in /hadoop/core/trunk: ./ bin/
src/mapred/org/apache/hadoop/mapred/ src/test/org/apache/hadoop/mapred/
src/test/testshell/
Author: cdouglas
Date: Tue Nov 25 01:25:58 2008
New Revision: 720448
URL: http://svn.apache.org/viewvc?rev=720448&view=rev
Log:
HADOOP-3986. Remove static Configuration from JobClient. Contributed by Amareshwari Sriramadasu.
Removed:
hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/JobShell.java
hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestJobShell.java
Modified:
hadoop/core/trunk/CHANGES.txt
hadoop/core/trunk/bin/hadoop
hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/JobClient.java
hadoop/core/trunk/src/test/testshell/ExternalMapReduce.java
Modified: hadoop/core/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/CHANGES.txt?rev=720448&r1=720447&r2=720448&view=diff
==============================================================================
--- hadoop/core/trunk/CHANGES.txt (original)
+++ hadoop/core/trunk/CHANGES.txt Tue Nov 25 01:25:58 2008
@@ -35,6 +35,12 @@
HADOOP-1650. Upgrade to Jetty 6. (cdouglas)
+ HADOOP-3986. Remove static Configuration from JobClient. (Amareshwari
+ Sriramadasu via cdouglas)
+ JobClient::setCommandLineConfig is removed
+ JobClient::getCommandLineConfig is removed
+ JobShell, TestJobShell classes are removed
+
NEW FEATURES
HADOOP-4575. Add a proxy service for relaying HsftpFileSystem requests.
Modified: hadoop/core/trunk/bin/hadoop
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/bin/hadoop?rev=720448&r1=720447&r2=720448&view=diff
==============================================================================
--- hadoop/core/trunk/bin/hadoop (original)
+++ hadoop/core/trunk/bin/hadoop Tue Nov 25 01:25:58 2008
@@ -211,7 +211,7 @@
CLASS=org.apache.hadoop.util.VersionInfo
HADOOP_OPTS="$HADOOP_OPTS $HADOOP_CLIENT_OPTS"
elif [ "$COMMAND" = "jar" ] ; then
- CLASS=org.apache.hadoop.mapred.JobShell
+ CLASS=org.apache.hadoop.util.RunJar
elif [ "$COMMAND" = "distcp" ] ; then
CLASS=org.apache.hadoop.tools.DistCp
CLASSPATH=${CLASSPATH}:${TOOL_PATH}
Modified: hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/JobClient.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/JobClient.java?rev=720448&r1=720447&r2=720448&view=diff
==============================================================================
--- hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/JobClient.java (original)
+++ hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/JobClient.java Tue Nov 25 01:25:58 2008
@@ -154,7 +154,6 @@
private static final Log LOG = LogFactory.getLog(JobClient.class);
public static enum TaskStatusFilter { NONE, KILLED, FAILED, SUCCEEDED, ALL }
private TaskStatusFilter taskOutputFilter = TaskStatusFilter.FAILED;
- private static Configuration commandLineConfig;
static long MAX_JOBPROFILE_AGE = 1000 * 2;
/**
@@ -399,24 +398,6 @@
}
/**
- * 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}.
* @param conf the job configuration.
* @throws IOException
@@ -541,8 +522,6 @@
private void configureCommandLineOptions(JobConf job, Path submitJobDir, Path submitJarFile)
throws IOException {
- final String warning = "Use genericOptions for the option ";
-
if (!(job.getBoolean("mapred.used.genericoptionsparser", false))) {
LOG.warn("Use GenericOptionsParser for parsing the arguments. " +
"Applications should implement Tool for the same.");
@@ -550,41 +529,13 @@
// get all the command line arguments into the
// jobconf passed in by the user conf
- Configuration commandConf = JobClient.getCommandLineConfig();
String files = null;
String libjars = null;
String archives = null;
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");
- if (libjars == null) {
- if (commandConf != null) {
- libjars = commandConf.get("tmpjars");
- if (libjars != null) {
- LOG.warn(warning + "-libjars");
- }
- }
- }
-
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
* accessed using this user's id
Modified: hadoop/core/trunk/src/test/testshell/ExternalMapReduce.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/test/testshell/ExternalMapReduce.java?rev=720448&r1=720447&r2=720448&view=diff
==============================================================================
--- hadoop/core/trunk/src/test/testshell/ExternalMapReduce.java (original)
+++ hadoop/core/trunk/src/test/testshell/ExternalMapReduce.java Tue Nov 25 01:25:58 2008
@@ -125,13 +125,8 @@
}
public static void main(String[] args) throws Exception {
- Configuration commandConf = JobClient.getCommandLineConfig();
- if (commandConf != null) {
- ToolRunner.run(new Configuration(commandConf),
+ int res = ToolRunner.run(new Configuration(),
new ExternalMapReduce(), args);
- } else {
- ToolRunner.run(new Configuration(),
- new ExternalMapReduce(), args);
- }
+ System.exit(res);
}
}