hadoop-mapreduce-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sc...@apache.org
Subject svn commit: r1069139 - in /hadoop/mapreduce/trunk: 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:12:54 GMT
Author: schen
Date: Wed Feb  9 22:12:54 2011
New Revision: 1069139

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

Modified:
    hadoop/mapreduce/trunk/CHANGES.txt
    hadoop/mapreduce/trunk/src/contrib/fairscheduler/src/java/org/apache/hadoop/mapred/FairScheduler.java
    hadoop/mapreduce/trunk/src/contrib/fairscheduler/src/test/org/apache/hadoop/mapred/TestFairScheduler.java

Modified: hadoop/mapreduce/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/trunk/CHANGES.txt?rev=1069139&r1=1069138&r2=1069139&view=diff
==============================================================================
--- hadoop/mapreduce/trunk/CHANGES.txt (original)
+++ hadoop/mapreduce/trunk/CHANGES.txt Wed Feb  9 22:12:54 2011
@@ -64,6 +64,8 @@ Trunk (unreleased changes)
     MAPREDUCE-2296. Fix references to misspelled method name
     getProtocolSigature (todd)
 
+    MAPREDUCE-2311. Fix TestFairScheduler failure (schen)
+
 Release 0.22.0 - Unreleased
 
   INCOMPATIBLE CHANGES

Modified: hadoop/mapreduce/trunk/src/contrib/fairscheduler/src/java/org/apache/hadoop/mapred/FairScheduler.java
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/trunk/src/contrib/fairscheduler/src/java/org/apache/hadoop/mapred/FairScheduler.java?rev=1069139&r1=1069138&r2=1069139&view=diff
==============================================================================
--- hadoop/mapreduce/trunk/src/contrib/fairscheduler/src/java/org/apache/hadoop/mapred/FairScheduler.java
(original)
+++ hadoop/mapreduce/trunk/src/contrib/fairscheduler/src/java/org/apache/hadoop/mapred/FairScheduler.java
Wed Feb  9 22:12:54 2011
@@ -669,9 +669,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/trunk/src/contrib/fairscheduler/src/test/org/apache/hadoop/mapred/TestFairScheduler.java
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/trunk/src/contrib/fairscheduler/src/test/org/apache/hadoop/mapred/TestFairScheduler.java?rev=1069139&r1=1069138&r2=1069139&view=diff
==============================================================================
--- hadoop/mapreduce/trunk/src/contrib/fairscheduler/src/test/org/apache/hadoop/mapred/TestFairScheduler.java
(original)
+++ hadoop/mapreduce/trunk/src/contrib/fairscheduler/src/test/org/apache/hadoop/mapred/TestFairScheduler.java
Wed Feb  9 22:12:54 2011
@@ -47,6 +47,7 @@ import org.apache.hadoop.mapreduce.serve
 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",
@@ -137,7 +138,8 @@ public class TestFairScheduler extends T
       initialized = true;
     }
     
-    public boolean isInitialized() {
+    @Override
+    public boolean inited() {
       return initialized;
     }
 
@@ -1366,12 +1368,12 @@ public class TestFairScheduler extends T
     // Submit jobs, advancing time in-between to make sure that they are
     // all submitted at distinct times.
     JobInProgress job1 = submitJobNotInitialized(JobStatus.PREP, 10, 10);
-    assertTrue(((FakeJobInProgress)job1).isInitialized());
+    assertTrue(((FakeJobInProgress)job1).inited());
     job1.getStatus().setRunState(JobStatus.RUNNING);
     JobInfo info1 = scheduler.infos.get(job1);
     advanceTime(10);
     JobInProgress job2 = submitJobNotInitialized(JobStatus.PREP, 10, 10);
-    assertTrue(((FakeJobInProgress)job2).isInitialized());
+    assertTrue(((FakeJobInProgress)job2).inited());
     job2.getStatus().setRunState(JobStatus.RUNNING);
     JobInfo info2 = scheduler.infos.get(job2);
     advanceTime(10);
@@ -1382,10 +1384,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