You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hama.apache.org by ed...@apache.org on 2015/02/23 10:48:52 UTC

svn commit: r1661628 - /hama/trunk/graph/src/main/java/org/apache/hama/graph/GraphJobRunner.java

Author: edwardyoon
Date: Mon Feb 23 09:48:52 2015
New Revision: 1661628

URL: http://svn.apache.org/r1661628
Log:
The finishVertexComputation() method should be called only after compute() is called.

Modified:
    hama/trunk/graph/src/main/java/org/apache/hama/graph/GraphJobRunner.java

Modified: hama/trunk/graph/src/main/java/org/apache/hama/graph/GraphJobRunner.java
URL: http://svn.apache.org/viewvc/hama/trunk/graph/src/main/java/org/apache/hama/graph/GraphJobRunner.java?rev=1661628&r1=1661627&r2=1661628&view=diff
==============================================================================
--- hama/trunk/graph/src/main/java/org/apache/hama/graph/GraphJobRunner.java (original)
+++ hama/trunk/graph/src/main/java/org/apache/hama/graph/GraphJobRunner.java Mon Feb 23 09:48:52 2015
@@ -241,18 +241,20 @@ public final class GraphJobRunner<V exte
       final byte[] serializedMsgs = currentMessage.getValuesBytes();
       msgs = getIterableMessages(numOfValues, serializedMsgs);
 
+      // reactivation
       if (vertex.isHalted()) {
         vertex.setActive();
       }
 
       if (!vertex.isHalted()) {
         vertex.compute((Iterable<M>) msgs);
-        notComputedVertices.remove(vertex.getVertexID());
+        vertices.finishVertexComputation(vertex);
         activeVertices++;
+
+        notComputedVertices.remove(vertex.getVertexID());
       }
 
       currentMessage = peer.getCurrentMessage();
-      vertices.finishVertexComputation(vertex);
     }
 
     for (V v : notComputedVertices) {