Return-Path: Delivered-To: apmail-hadoop-core-commits-archive@www.apache.org Received: (qmail 2995 invoked from network); 25 Nov 2008 09:26:21 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 25 Nov 2008 09:26:21 -0000 Received: (qmail 22458 invoked by uid 500); 25 Nov 2008 09:26:31 -0000 Delivered-To: apmail-hadoop-core-commits-archive@hadoop.apache.org Received: (qmail 22432 invoked by uid 500); 25 Nov 2008 09:26:31 -0000 Mailing-List: contact core-commits-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: core-dev@hadoop.apache.org Delivered-To: mailing list core-commits@hadoop.apache.org Received: (qmail 22423 invoked by uid 99); 25 Nov 2008 09:26:31 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Nov 2008 01:26:31 -0800 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Nov 2008 09:25:13 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 02573238889C; Tue, 25 Nov 2008 01:26:00 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r720448 - in /hadoop/core/trunk: ./ bin/ src/mapred/org/apache/hadoop/mapred/ src/test/org/apache/hadoop/mapred/ src/test/testshell/ Date: Tue, 25 Nov 2008 09:25:59 -0000 To: core-commits@hadoop.apache.org From: cdouglas@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20081125092600.02573238889C@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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); } }