hama-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ilias Kapouranis (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (HAMA-833) Add more finish states for vertices
Date Mon, 23 Dec 2013 11:44:53 GMT

    [ https://issues.apache.org/jira/browse/HAMA-833?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13855567#comment-13855567
] 

Ilias Kapouranis edited comment on HAMA-833 at 12/23/13 11:44 AM:
------------------------------------------------------------------

Yeah I mean the vertex that votes to halt, skips the very next aggregation phase.
In the code you posted, if a node votes to halt at a superstep gets aggregated without checking
again!

A simple change would be:

 if (iterable != null && vertex.isHalted()) {
        vertex.setActive();
 }
 if (!vertex.isHalted()) {
        M lastValue = vertex.getValue();
        if (iterable == null) {
               vertex.compute(Collections.<M> emptyList());
        } else {
               if (combiner != null) {
                      M combined = combiner.combine(iterable);
                      vertex.compute(Collections.singleton(combined));
               } else {
                     vertex.compute(iterable);
              } 
              currentMessage = iterable.getOverflowMessage();
        }       
}

if (!vertex.isHalted()) {
       getAggregationRunner().aggregateVertex(lastValue, vertex);
       activeVertices++;
}


With this we check again if the node has voted to halt in the same superstep.
I don't know if this code will work but I think you get my idea.


was (Author: ikapoura):
Yeah I mean the vertex that votes to halt, skips the very next aggregation phase.
In the code you posted, if a node votes to halt at a superstep gets aggregated without checking
again!

A simple change would be:

 if (iterable != null && vertex.isHalted()) {
        vertex.setActive();
 }
 if (!vertex.isHalted()) {
        M lastValue = vertex.getValue();
        if (iterable == null) {
               vertex.compute(Collections.<M> emptyList());
        } else {
               if (combiner != null) {
                      M combined = combiner.combine(iterable);
                      vertex.compute(Collections.singleton(combined));
               } else {
                     vertex.compute(iterable);
              } 
              currentMessage = iterable.getOverflowMessage();
        }       
}

if (!vertex.isHalted()) {
       getAggregationRunner().aggregateVertex(lastValue, vertex);
       activeVertices++;
}


With this we check again if the node has voted to halt in the same superstep.
I don't if this code will work but I think you get my idea.

> Add more finish states for vertices
> -----------------------------------
>
>                 Key: HAMA-833
>                 URL: https://issues.apache.org/jira/browse/HAMA-833
>             Project: Hama
>          Issue Type: Improvement
>          Components: graph
>    Affects Versions: 0.6.3
>            Reporter: Anastasis Andronidis
>            Assignee: Anastasis Andronidis
>            Priority: Minor
>              Labels: features
>             Fix For: 0.7.0
>
>
> We should handle more cases on the vertices, like:
> 1) voteToStop() : Immediately stop the vertex compute and suppress any further calculations
on top of that. (e.g. aggregation)
> 2) voteToTerminate(): Immediately stop the vertex compute, suppress any further calculations
on top of that and deactivate the vertex so even if any message reaches it, will not come
alive.
> Any comments?



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Mime
View raw message