The finishVertexComputation() method should be called only after
compute() is called.


Index: graph/src/main/java/org/apache/hama/graph/GraphJobRunner.java
===================================================================
--- graph/src/main/java/org/apache/hama/graph/GraphJobRunner.java
(revision 1660064)
+++ graph/src/main/java/org/apache/hama/graph/GraphJobRunner.java
(working copy)
@@ -241,6 +241,7 @@
       final byte[] serializedMsgs = currentMessage.getValuesBytes();
       msgs = getIterableMessages(numOfValues, serializedMsgs);

+      // reactivation
       if (vertex.isHalted()) {
         vertex.setActive();
       }
@@ -247,12 +248,13 @@

       if (!vertex.isHalted()) {
         vertex.compute((Iterable<M>) msgs);
+        vertices.finishVertexComputation(vertex);
+        activeVertices++;
+
         notComputedVertices.remove(vertex.getVertexID());
-        activeVertices++;
       }

       currentMessage = peer.getCurrentMessage();
-      vertices.finishVertexComputation(vertex);
     }

     for (V v : notComputedVertices) {


-- 
Best Regards, Edward J. Yoon

Reply via email to