You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@giraph.apache.org by di...@apache.org on 2018/09/21 17:24:47 UTC

git commit: updated refs/heads/trunk to 7f6a33d

Repository: giraph
Updated Branches:
  refs/heads/trunk 6128d66eb -> 7f6a33d94


GIRAPH-1201

closes #84


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

Branch: refs/heads/trunk
Commit: 7f6a33d94efdfa9f1db4bd71da6ddff10aace45e
Parents: 6128d66
Author: Dionysios Logothetis <dl...@gmail.com>
Authored: Fri Sep 21 10:24:28 2018 -0700
Committer: Dionysios Logothetis <di...@fb.com>
Committed: Fri Sep 21 10:24:28 2018 -0700

----------------------------------------------------------------------
 .../main/java/org/apache/giraph/master/BspServiceMaster.java | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/giraph/blob/7f6a33d9/giraph-core/src/main/java/org/apache/giraph/master/BspServiceMaster.java
----------------------------------------------------------------------
diff --git a/giraph-core/src/main/java/org/apache/giraph/master/BspServiceMaster.java b/giraph-core/src/main/java/org/apache/giraph/master/BspServiceMaster.java
index a95a19c..dac898e 100644
--- a/giraph-core/src/main/java/org/apache/giraph/master/BspServiceMaster.java
+++ b/giraph-core/src/main/java/org/apache/giraph/master/BspServiceMaster.java
@@ -1379,9 +1379,15 @@ public class BspServiceMaster<I extends WritableComparable,
 
       // Wait for a signal or timeout
       boolean eventTriggered = event.waitMsecs(eventLoopTimeout);
+
+      // If the event was triggered, we reset it. In the next loop run, we will
+      // read ZK to get the new hosts.
+      if (eventTriggered) {
+        event.reset();
+      }
+
       long elapsedTimeSinceRegularRunMsec = System.currentTimeMillis() -
           lastRegularRunTimeMsec;
-      event.reset();
       getContext().progress();
 
       if (eventTriggered ||