hama-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From edwardy...@apache.org
Subject svn commit: r1498066 - in /hama/trunk: CHANGES.txt examples/src/main/java/org/apache/hama/examples/SSSP.java graph/src/main/java/org/apache/hama/graph/GraphJobRunner.java
Date Sun, 30 Jun 2013 07:24:40 GMT
Author: edwardyoon
Date: Sun Jun 30 07:24:40 2013
New Revision: 1498066

URL: http://svn.apache.org/r1498066
Log:
Determining the count of active vertices

Modified:
    hama/trunk/CHANGES.txt
    hama/trunk/examples/src/main/java/org/apache/hama/examples/SSSP.java
    hama/trunk/graph/src/main/java/org/apache/hama/graph/GraphJobRunner.java

Modified: hama/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hama/trunk/CHANGES.txt?rev=1498066&r1=1498065&r2=1498066&view=diff
==============================================================================
--- hama/trunk/CHANGES.txt (original)
+++ hama/trunk/CHANGES.txt Sun Jun 30 07:24:40 2013
@@ -6,6 +6,8 @@ Release 0.6.3 (unreleased changes)
 
   BUG FIXES
 
+  HAMA-771: Determining the count of active vertices (edwardyoon)
+
   IMPROVEMENTS
 
    HAMA-765: Add apply method to Vector/Matrix (Yexi Jiang)

Modified: hama/trunk/examples/src/main/java/org/apache/hama/examples/SSSP.java
URL: http://svn.apache.org/viewvc/hama/trunk/examples/src/main/java/org/apache/hama/examples/SSSP.java?rev=1498066&r1=1498065&r2=1498066&view=diff
==============================================================================
--- hama/trunk/examples/src/main/java/org/apache/hama/examples/SSSP.java (original)
+++ hama/trunk/examples/src/main/java/org/apache/hama/examples/SSSP.java Sun Jun 30 07:24:40
2013
@@ -67,9 +67,8 @@ public class SSSP {
         for (Edge<Text, IntWritable> e : this.getEdges()) {
           sendMessage(e, new IntWritable(minDist + e.getValue().get()));
         }
-      } else {
-        voteToHalt();
       }
+      voteToHalt();
     }
 
   }

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=1498066&r1=1498065&r2=1498066&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 Sun Jun 30 07:24:40
2013
@@ -246,10 +246,7 @@ public final class GraphJobRunner<V exte
           currentMessage = iterable.getOverflowMessage();
         }
         aggregationRunner.aggregateVertex(lastValue, vertex);
-        // check for halt again after computation
-        if (!vertex.isHalted()) {
-          activeVertices++;
-        }
+        activeVertices++;
       }
 
       // note that we even need to rewrite the vertex if it is halted for
@@ -274,10 +271,10 @@ public final class GraphJobRunner<V exte
    * reached. <br/>
    * - if vertex is inactive, and received no message, return null.
    */
+  @SuppressWarnings("unchecked")
   private VertexMessageIterable<V, M> iterate(GraphJobMessage currentMessage,
       V firstMessageId, Vertex<V, E, M> vertex,
       BSPPeer<Writable, Writable, Writable, Writable, GraphJobMessage> peer) {
-    @SuppressWarnings("unchecked")
     int comparision = firstMessageId.compareTo(vertex.getVertexID());
     if (conf.getBoolean("hama.check.missing.vertex", true)) {
       if (comparision < 0) {



Mime
View raw message