hadoop-mapreduce-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sc...@apache.org
Subject svn commit: r1069146 - in /hadoop/mapreduce/branches/branch-0.22: CHANGES.txt src/contrib/fairscheduler/src/java/org/apache/hadoop/mapred/FairScheduler.java src/contrib/fairscheduler/src/test/org/apache/hadoop/mapred/TestFairScheduler.java
Date Wed, 09 Feb 2011 22:20:18 GMT
Author: schen
Date: Wed Feb  9 22:20:18 2011
New Revision: 1069146

URL: http://svn.apache.org/viewvc?rev=1069146&view=rev
Log:
MAPREDUCE-2311. Fix TestFairScheduler failure (schen)

Modified:
    hadoop/mapreduce/branches/branch-0.22/CHANGES.txt
    hadoop/mapreduce/branches/branch-0.22/src/contrib/fairscheduler/src/java/org/apache/hadoop/mapred/FairScheduler.java
    hadoop/mapreduce/branches/branch-0.22/src/contrib/fairscheduler/src/test/org/apache/hadoop/mapred/TestFairScheduler.java

Modified: hadoop/mapreduce/branches/branch-0.22/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/branches/branch-0.22/CHANGES.txt?rev=1069146&r1=1069145&r2=1069146&view=diff
==============================================================================
--- hadoop/mapreduce/branches/branch-0.22/CHANGES.txt (original)
+++ hadoop/mapreduce/branches/branch-0.22/CHANGES.txt Wed Feb  9 22:20:18 2011
@@ -482,6 +482,8 @@ Release 0.22.0 - Unreleased
     MAPREDUCE-2285. MiniMRCluster does not start after ant test-patch
     (todd)
 
+    MAPREDUCE-2311. Fix TestFairScheduler failure (schen)
+
 Release 0.21.1 - Unreleased
 
   NEW FEATURES

Modified: hadoop/mapreduce/branches/branch-0.22/src/contrib/fairscheduler/src/java/org/apache/hadoop/mapred/FairScheduler.java
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/branches/branch-0.22/src/contrib/fairscheduler/src/java/org/apache/hadoop/mapred/FairScheduler.java?rev=1069146&r1=1069145&r2=1069146&view=diff
==============================================================================
--- hadoop/mapreduce/branches/branch-0.22/src/contrib/fairscheduler/src/java/org/apache/hadoop/mapred/FairScheduler.java
(original)
+++ hadoop/mapreduce/branches/branch-0.22/src/contrib/fairscheduler/src/java/org/apache/hadoop/mapred/FairScheduler.java
Wed Feb  9 22:20:18 2011
@@ -676,9 +676,6 @@ public class FairScheduler extends TaskS
     Map<String, Integer> userJobs = new HashMap<String, Integer>();
     Map<String, Integer> poolJobs = new HashMap<String, Integer>();
     for (JobInProgress job: jobs) {
-      if (!job.inited()) {
-        continue;
-      }
       String user = job.getJobConf().getUser();
       String pool = poolMgr.getPoolName(job);
       int userCount = userJobs.containsKey(user) ? userJobs.get(user) : 0;

Modified: hadoop/mapreduce/branches/branch-0.22/src/contrib/fairscheduler/src/test/org/apache/hadoop/mapred/TestFairScheduler.java
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/branches/branch-0.22/src/contrib/fairscheduler/src/test/org/apache/hadoop/mapred/TestFairScheduler.java?rev=1069146&r1=1069145&r2=1069146&view=diff
==============================================================================
--- hadoop/mapreduce/branches/branch-0.22/src/contrib/fairscheduler/src/test/org/apache/hadoop/mapred/TestFairScheduler.java
(original)
+++ hadoop/mapreduce/branches/branch-0.22/src/contrib/fairscheduler/src/test/org/apache/hadoop/mapred/TestFairScheduler.java
Wed Feb  9 22:20:18 2011
@@ -46,6 +46,7 @@ import org.apache.hadoop.mapred.JobInPro
 import org.apache.hadoop.mapreduce.server.jobtracker.TaskTracker;
 import org.apache.hadoop.mapreduce.split.JobSplit;
 import org.apache.hadoop.net.Node;
+import org.mortbay.log.Log;
 
 public class TestFairScheduler extends TestCase {
   final static String TEST_DIR = new File(System.getProperty("test.build.data",
@@ -136,7 +137,8 @@ public class TestFairScheduler extends T
       initialized = true;
     }
 
-    public boolean isInitialized() {
+    @Override
+    public boolean inited() {
       return initialized;
     }
 
@@ -1378,10 +1380,10 @@ public class TestFairScheduler extends T
     JobInfo info4 = scheduler.infos.get(job4);
 
     // Only two of the jobs should be initialized.
-    assertTrue(((FakeJobInProgress)job1).isInitialized());
-    assertTrue(((FakeJobInProgress)job2).isInitialized());
-    assertFalse(((FakeJobInProgress)job3).isInitialized());
-    assertFalse(((FakeJobInProgress)job4).isInitialized());
+    assertTrue(((FakeJobInProgress)job1).inited());
+    assertTrue(((FakeJobInProgress)job2).inited());
+    assertFalse(((FakeJobInProgress)job3).inited());
+    assertFalse(((FakeJobInProgress)job4).inited());
 
     // Check scheduler variables
     assertEquals(2.0,  info1.mapSchedulable.getFairShare());



Mime
View raw message