hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r604409 - in /lucene/hadoop/trunk: CHANGES.txt src/examples/org/apache/hadoop/examples/Sort.java
Date Sat, 15 Dec 2007 09:16:39 GMT
Author: ddas
Date: Sat Dec 15 01:16:38 2007
New Revision: 604409

URL: http://svn.apache.org/viewvc?rev=604409&view=rev
Log:
HADOOP-2376. Prevents sort example from overriding the number of maps. Contributed by Owen
O'Malley.

Modified:
    lucene/hadoop/trunk/CHANGES.txt
    lucene/hadoop/trunk/src/examples/org/apache/hadoop/examples/Sort.java

Modified: lucene/hadoop/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/CHANGES.txt?rev=604409&r1=604408&r2=604409&view=diff
==============================================================================
--- lucene/hadoop/trunk/CHANGES.txt (original)
+++ lucene/hadoop/trunk/CHANGES.txt Sat Dec 15 01:16:38 2007
@@ -240,6 +240,9 @@
     HADOOP-2323. JobTracker.close() should not print stack traces for
     normal exit.  (jimk via cutting)
 
+    HADOOP-2376. Prevents sort example from overriding the number of maps.
+    (Owen O'Malley via ddas)
+
 Branch 0.15 (unreleased)
 
   BUG FIXES

Modified: lucene/hadoop/trunk/src/examples/org/apache/hadoop/examples/Sort.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/examples/org/apache/hadoop/examples/Sort.java?rev=604409&r1=604408&r2=604409&view=diff
==============================================================================
--- lucene/hadoop/trunk/src/examples/org/apache/hadoop/examples/Sort.java (original)
+++ lucene/hadoop/trunk/src/examples/org/apache/hadoop/examples/Sort.java Sat Dec 15 01:16:38
2007
@@ -74,8 +74,6 @@
 
     JobClient client = new JobClient(jobConf);
     ClusterStatus cluster = client.getClusterStatus();
-    int num_maps = cluster.getTaskTrackers() * 
-    jobConf.getInt("test.sort.maps_per_host", 10);
     int num_reduces = (int) (cluster.getMaxReduceTasks() * 0.9);
     String sort_reduces = jobConf.get("test.sort.reduces_per_host");
     if (sort_reduces != null) {
@@ -92,7 +90,7 @@
     for(int i=0; i < args.length; ++i) {
       try {
         if ("-m".equals(args[i])) {
-          num_maps = Integer.parseInt(args[++i]);
+          jobConf.setNumMapTasks(Integer.parseInt(args[++i]));
         } else if ("-r".equals(args[i])) {
           num_reduces = Integer.parseInt(args[++i]);
         } else if ("-inFormat".equals(args[i])) {
@@ -121,7 +119,6 @@
     }
 
     // Set user-supplied (possibly default) job configs
-    jobConf.setNumMapTasks(num_maps);
     jobConf.setNumReduceTasks(num_reduces);
 
     jobConf.setInputFormat(inputFormatClass);



Mime
View raw message