[
https://issues.apache.org/jira/browse/HAMA-838?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13882738#comment-13882738
]
Edward J. Yoon commented on HAMA-838:
-------------------------------------
If possible, let's use the string name, instead of integer index.
The main problem in your patch, was missing of aggregateVertex().
AbsDiffAggregator is side issue.
{code}
/**
* Aggregates the last value before computation and the value after the
* computation.
*
* @param lastValue the value before compute().
* @param v the vertex.
*/
public void aggregateVertex(int index, M lastValue, M value) {
if (isEnabled()) {
Aggregator<M> aggregator = this.aggregators[index];
aggregator.aggregate(value);
if (isAbstractAggregator[index]) {
AbstractAggregator<M> intern = (AbstractAggregator<M>) aggregator;
intern.aggregate(lastValue, value);
intern.aggregateInternal();
}
}
}
{code}
> Add custom aggregators
> ----------------------
>
> Key: HAMA-838
> URL: https://issues.apache.org/jira/browse/HAMA-838
> Project: Hama
> Issue Type: Improvement
> Components: graph
> Affects Versions: 0.6.3
> Reporter: Anastasis Andronidis
> Assignee: Anastasis Andronidis
> Labels: features, patch
> Fix For: 0.7.0
>
> Attachments: HAMA-838.patch, HAMA-838_v02.patch, patch.txt,
> patch_v02.txt
>
>
> This is a patch that adds custom aggregators.
> I also wrote an example of how you can use them.
> Implementation features:
> * Register the aggregators by name.
> * Custom aggregators are skipped when there are no messages to process
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)