giraph-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m...@apache.org
Subject git commit: GIRAPH-429: Number of input split threads set to 1 less than necessary (majakabiljo)
Date Tue, 05 Feb 2013 18:58:55 GMT
Updated Branches:
  refs/heads/trunk 1c967b8e0 -> f34e9b7c8


GIRAPH-429: Number of input split threads set to 1 less than necessary (majakabiljo)


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

Branch: refs/heads/trunk
Commit: f34e9b7c864b32dde6134e0ef2cfb26ab47195a5
Parents: 1c967b8
Author: Maja Kabiljo <majakabiljo@fb.com>
Authored: Tue Feb 5 10:49:09 2013 -0800
Committer: Maja Kabiljo <majakabiljo@fb.com>
Committed: Tue Feb 5 10:49:09 2013 -0800

----------------------------------------------------------------------
 CHANGELOG                                          |    2 ++
 .../org/apache/giraph/worker/BspServiceWorker.java |    5 ++---
 2 files changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/giraph/blob/f34e9b7c/CHANGELOG
----------------------------------------------------------------------
diff --git a/CHANGELOG b/CHANGELOG
index 926e404..b18c417 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,6 +1,8 @@
 Giraph Change Log
 
 Release 0.2.0 - unreleased
+  GIRAPH-429: Number of input split threads set to 1 less than necessary (majakabiljo)
+  
   GIRAPH-498: We should check input splits status from zookeeeper once per worker, 
   not once per split thread (majakabiljo)
 

http://git-wip-us.apache.org/repos/asf/giraph/blob/f34e9b7c/giraph-core/src/main/java/org/apache/giraph/worker/BspServiceWorker.java
----------------------------------------------------------------------
diff --git a/giraph-core/src/main/java/org/apache/giraph/worker/BspServiceWorker.java b/giraph-core/src/main/java/org/apache/giraph/worker/BspServiceWorker.java
index ff1033e..71ea749 100644
--- a/giraph-core/src/main/java/org/apache/giraph/worker/BspServiceWorker.java
+++ b/giraph-core/src/main/java/org/apache/giraph/worker/BspServiceWorker.java
@@ -247,9 +247,8 @@ public class BspServiceWorker<I extends WritableComparable,
     throws KeeperException, InterruptedException {
     VertexEdgeCount vertexEdgeCount = new VertexEdgeCount();
     // Determine how many threads to use based on the number of input splits
-    int maxInputSplitThreads =
-        Math.max(
-            inputSplitPathList.size() / getConfiguration().getMaxWorkers(), 1);
+    int maxInputSplitThreads = (inputSplitPathList.size() - 1) /
+        getConfiguration().getMaxWorkers() + 1;
     int numThreads = Math.min(getConfiguration().getNumInputSplitsThreads(),
         maxInputSplitThreads);
     ExecutorService inputSplitsExecutor =


Mime
View raw message