tez-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bi...@apache.org
Subject git commit: TEZ-170. DAGSchedulerMRR does not schedule tasks with a vertex distance > 1 (bikas)
Date Fri, 14 Jun 2013 18:05:33 GMT
Updated Branches:
  refs/heads/master 0975207c8 -> ca8bb521a


TEZ-170. DAGSchedulerMRR does not schedule tasks with a vertex distance > 1 (bikas)


Project: http://git-wip-us.apache.org/repos/asf/incubator-tez/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tez/commit/ca8bb521
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tez/tree/ca8bb521
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tez/diff/ca8bb521

Branch: refs/heads/master
Commit: ca8bb521a17a9f09dda53094be9c31687d483a03
Parents: 0975207
Author: Bikas Saha <bikas@apache.org>
Authored: Fri Jun 14 11:01:48 2013 -0700
Committer: Bikas Saha <bikas@apache.org>
Committed: Fri Jun 14 11:01:48 2013 -0700

----------------------------------------------------------------------
 .../impl/BipartiteSlowStartVertexScheduler.java |  4 ++--
 .../dag/app/dag/impl/TestVertexScheduler.java   | 21 ++++++++++----------
 2 files changed, 13 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tez/blob/ca8bb521/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/BipartiteSlowStartVertexScheduler.java
----------------------------------------------------------------------
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/BipartiteSlowStartVertexScheduler.java
b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/BipartiteSlowStartVertexScheduler.java
index c951518..3f586cb 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/BipartiteSlowStartVertexScheduler.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/BipartiteSlowStartVertexScheduler.java
@@ -61,11 +61,11 @@ public class BipartiteSlowStartVertexScheduler implements VertexScheduler
{
     this.slowStartMinSrcCompletionFraction = slowStartMinSrcCompletionFraction;
     this.slowStartMaxSrcCompletionFraction = slowStartMaxSrcCompletionFraction;
     
-    if(slowStartMinSrcCompletionFraction < 0 || 
+    if(slowStartMinSrcCompletionFraction <= 0 || 
        slowStartMaxSrcCompletionFraction < slowStartMinSrcCompletionFraction) {
       throw new IllegalArgumentException(
           "Invalid values for slowStartMinSrcCompletionFraction" + 
-          "/slowStartMaxSrcCompletionFraction. Min cannot be < 0 and " + 
+          "/slowStartMaxSrcCompletionFraction. Min cannot be <= 0 and " + 
           "max cannot be < min.");
     }
     

http://git-wip-us.apache.org/repos/asf/incubator-tez/blob/ca8bb521/tez-dag/src/test/java/org/apache/tez/dag/app/dag/impl/TestVertexScheduler.java
----------------------------------------------------------------------
diff --git a/tez-dag/src/test/java/org/apache/tez/dag/app/dag/impl/TestVertexScheduler.java
b/tez-dag/src/test/java/org/apache/tez/dag/app/dag/impl/TestVertexScheduler.java
index 38cc9fe..9102897 100644
--- a/tez-dag/src/test/java/org/apache/tez/dag/app/dag/impl/TestVertexScheduler.java
+++ b/tez-dag/src/test/java/org/apache/tez/dag/app/dag/impl/TestVertexScheduler.java
@@ -78,7 +78,8 @@ public class TestVertexScheduler {
     // fail if there is no bipartite src vertex
     mockInputVertices.put(mockSrcVertex3, eProp3);
     try {
-     scheduler = new BipartiteSlowStartVertexScheduler(mockManagedVertex, 0, 0);
+      scheduler = new BipartiteSlowStartVertexScheduler(mockManagedVertex,
+          0.1f, 0.1f);
      Assert.assertFalse(true);
     } catch (TezUncheckedException e) {
       Assert.assertTrue(e.getMessage().contains(
@@ -124,15 +125,15 @@ public class TestVertexScheduler {
     
     when(mockSrcVertex1.getTotalTasks()).thenReturn(2);
     when(mockSrcVertex2.getTotalTasks()).thenReturn(2);
-    
-    // source vertex have some tasks. min, max == 0
-    scheduler = new BipartiteSlowStartVertexScheduler(mockManagedVertex, 0, 0);
-    scheduler.onVertexStarted();
-    Assert.assertTrue(scheduler.numSourceTasks == 4);
-    Assert.assertTrue(scheduler.totalTasksToSchedule == 3);
-    Assert.assertTrue(scheduler.numSourceTasksCompleted == 0);
-    Assert.assertTrue(scheduler.pendingTasks.isEmpty());
-    Assert.assertTrue(scheduledTasks.size() == 3); // all tasks scheduled
+
+    try {
+      // source vertex have some tasks. min, max == 0
+      scheduler = new BipartiteSlowStartVertexScheduler(mockManagedVertex, 0, 0);
+      Assert.assertTrue(false); // should not come here
+    } catch (IllegalArgumentException e) {
+      Assert.assertTrue(e.getMessage().contains(
+          "Invalid values for slowStartMinSrcCompletionFraction"));
+    }
     
     TezTaskAttemptID mockSrcAttemptId11 = 
         new TezTaskAttemptID(new TezTaskID(mockSrcVertexId1, 0), 0);


Mime
View raw message