hama-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andronidis Anastasios <andronat_...@hotmail.com>
Subject Re: Small quick patch
Date Mon, 23 Feb 2015 10:06:37 GMT
+1

On 23 Φεβ 2015, at 10:48 π.μ., Edward J. Yoon <edwardyoon@apache.org> wrote:

> 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


Mime
View raw message