drill-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s..@apache.org
Subject [1/2] drill git commit: DRILL-2916: Correctly set minimum per fragment in AssignmentCreator
Date Thu, 30 Apr 2015 21:16:31 GMT
Repository: drill
Updated Branches:
  refs/heads/master f29444fa2 -> f8a91f14b


DRILL-2916: Correctly set minimum per fragment in AssignmentCreator


Project: http://git-wip-us.apache.org/repos/asf/drill/repo
Commit: http://git-wip-us.apache.org/repos/asf/drill/commit/0f6c7ff5
Tree: http://git-wip-us.apache.org/repos/asf/drill/tree/0f6c7ff5
Diff: http://git-wip-us.apache.org/repos/asf/drill/diff/0f6c7ff5

Branch: refs/heads/master
Commit: 0f6c7ff506ba0ead612c77830e4b6daac9a7541c
Parents: f29444f
Author: Steven Phillips <smp@apache.org>
Authored: Thu Apr 30 11:02:33 2015 -0700
Committer: Steven Phillips <smp@apache.org>
Committed: Thu Apr 30 11:06:29 2015 -0700

----------------------------------------------------------------------
 .../org/apache/drill/exec/store/schedule/AssignmentCreator.java  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/drill/blob/0f6c7ff5/exec/java-exec/src/main/java/org/apache/drill/exec/store/schedule/AssignmentCreator.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/store/schedule/AssignmentCreator.java
b/exec/java-exec/src/main/java/org/apache/drill/exec/store/schedule/AssignmentCreator.java
index bfc104f..1f4d8cb 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/store/schedule/AssignmentCreator.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/store/schedule/AssignmentCreator.java
@@ -247,14 +247,14 @@ public class AssignmentCreator<T extends CompleteWork> {
       FragIteratorWrapper wrapper = new FragIteratorWrapper();
       wrapper.iter = Iterators.cycle(mmap.get(endpoint));
       wrapper.maxCount = maxWork * mmap.get(endpoint).size();
-      wrapper.minCount = Math.max((maxWork - 1) * mmap.get(endpoint).size(), 1);
+      wrapper.minCount = Math.max(maxWork - 1, 1) * mmap.get(endpoint).size();
       map.put(endpoint, wrapper);
     }
     return map;
   }
 
   /**
-   * A struct that holds an fragment iterator and keeps track of how many units have been
assigned, as well as the maximum
+   * A struct that holds a fragment iterator and keeps track of how many units have been
assigned, as well as the maximum
    * number of assignment it will accept
    */
   private static class FragIteratorWrapper {


Mime
View raw message