[
https://issues.apache.org/jira/browse/HAMA-833?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13855567#comment-13855567
]
Ilias Kapouranis commented on HAMA-833:
---------------------------------------
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)