[
https://issues.apache.org/jira/browse/HAMA-458?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Edward J. Yoon updated HAMA-458:
--------------------------------
Attachment: combiner_v02.patch
Here's my final patch.
Message combiner can be implemented as below:
{code}
public static class SumCombiner extends Combiner {
@Override
public BSPMessageBundle combine(Iterable<BSPMessage> messages) {
BSPMessageBundle bundle = new BSPMessageBundle();
int sum = 0;
Iterator<BSPMessage> it = messages.iterator();
while (it.hasNext()) {
sum += ((IntegerMessage) it.next()).getData();
}
bundle.addMessage(new IntegerMessage("Sum", sum));
return bundle;
}
}
{code}
And test passed.
> Add Combiners
> -------------
>
> Key: HAMA-458
> URL: https://issues.apache.org/jira/browse/HAMA-458
> Project: Hama
> Issue Type: New Feature
> Reporter: Thomas Jungblut
> Assignee: Edward J. Yoon
> Attachments: combiner_v01.patch, combiner_v02.patch
>
>
> We have spoken about it on the mailing list:
> http://www.mail-archive.com/[email protected]/msg05540.html
> Small extract:
> {quote}
> When should the combiner be called and in which form. In MapReduce they
> are plain reducers, so we can have the same model but not grouped by a key
> rather than the class name of the message.
> {quote}
> Especially if we could collect all task data on the same host and combine
> them. This would yield into better performance.
> We need a smart idea.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira