ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From voze...@apache.org
Subject [2/2] ignite git commit: IGNITE-3414: Implemented local reducer distribution logic.
Date Tue, 05 Jul 2016 10:27:53 GMT
IGNITE-3414: Implemented local reducer distribution logic.


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/2eae6392
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/2eae6392
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/2eae6392

Branch: refs/heads/ignite-3414
Commit: 2eae6392c60711c15b0fd4884b05a72a65cb4f25
Parents: c7add72
Author: vozerov-gridgain <vozerov@gridgain.com>
Authored: Tue Jul 5 13:27:46 2016 +0300
Committer: vozerov-gridgain <vozerov@gridgain.com>
Committed: Tue Jul 5 13:27:46 2016 +0300

----------------------------------------------------------------------
 .../mapreduce/IgniteHadoopWeightedMapReducePlanner.java      | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/2eae6392/modules/hadoop/src/main/java/org/apache/ignite/hadoop/mapreduce/IgniteHadoopWeightedMapReducePlanner.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/main/java/org/apache/ignite/hadoop/mapreduce/IgniteHadoopWeightedMapReducePlanner.java
b/modules/hadoop/src/main/java/org/apache/ignite/hadoop/mapreduce/IgniteHadoopWeightedMapReducePlanner.java
index 9f85a97..eb3f1ad 100644
--- a/modules/hadoop/src/main/java/org/apache/ignite/hadoop/mapreduce/IgniteHadoopWeightedMapReducePlanner.java
+++ b/modules/hadoop/src/main/java/org/apache/ignite/hadoop/mapreduce/IgniteHadoopWeightedMapReducePlanner.java
@@ -381,9 +381,11 @@ public class IgniteHadoopWeightedMapReducePlanner extends HadoopAbstractMapReduc
             HadoopInputSplit split = entry.getKey();
             int cnt = entry.getValue();
 
-            int assigned = assignLocalReducers(split, cnt, res);
+            if (cnt > 0) {
+                int assigned = assignLocalReducers(split, cnt, top, mappers, res);
 
-            remaining += cnt - assigned;
+                remaining += cnt - assigned;
+            }
         }
 
         // Assign the rest reducers.
@@ -418,7 +420,7 @@ public class IgniteHadoopWeightedMapReducePlanner extends HadoopAbstractMapReduc
         // Assign more reducers to the node until threshold is reached.
         int res = 0;
 
-        while (grp.weight() < reducerMigrationThresholdWeight) {
+        while (res < cnt && grp.weight() < reducerMigrationThresholdWeight)
{
             res++;
 
             grp.weight(grp.weight() + locReducerWeight);


Mime
View raw message