Return-Path: X-Original-To: apmail-incubator-hama-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-hama-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9CC809B6D for ; Thu, 8 Mar 2012 07:21:52 +0000 (UTC) Received: (qmail 40798 invoked by uid 500); 8 Mar 2012 07:21:24 -0000 Delivered-To: apmail-incubator-hama-dev-archive@incubator.apache.org Received: (qmail 37920 invoked by uid 500); 8 Mar 2012 07:21:17 -0000 Mailing-List: contact hama-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hama-dev@incubator.apache.org Delivered-To: mailing list hama-dev@incubator.apache.org Received: (qmail 31817 invoked by uid 99); 8 Mar 2012 07:17:23 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Mar 2012 07:17:23 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Mar 2012 07:17:20 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 0DE7EF3FF for ; Thu, 8 Mar 2012 07:17:00 +0000 (UTC) Date: Thu, 8 Mar 2012 07:17:00 +0000 (UTC) From: "Thomas Jungblut (Commented) (JIRA)" To: hama-dev@incubator.apache.org Message-ID: <610395140.38344.1331191020058.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <510999518.22466.1330328571972.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (HAMA-518) Add MinIntCombiner to SSSP example MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HAMA-518?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13225065#comment-13225065 ] Thomas Jungblut commented on HAMA-518: -------------------------------------- if you move the combiner.class check to setup method rather than in the bsp method I would be +1. > Add MinIntCombiner to SSSP example > ---------------------------------- > > Key: HAMA-518 > URL: https://issues.apache.org/jira/browse/HAMA-518 > Project: Hama > Issue Type: New Feature > Components: examples, graph > Affects Versions: 0.4.0 > Reporter: Edward J. Yoon > Assignee: Edward J. Yoon > Fix For: 0.5.0 > > Attachments: Combiner.patch > > > If we able to use BSP's combiner function, MinIntCombiner can be implemented like this: > {code} > public static class MinIntCombiner extends Combiner { > @Override > public BSPMessageBundle combine(Iterable messages) { > BSPMessageBundle bundle = new BSPMessageBundle(); > int minDist = Integer.MAX_VALUE; > Iterator it = messages.iterator(); > while (it.hasNext()) { > int msgValue = it.next().get(); > if(minDIst > msgValue) > minDist = msgValue; > } > bundle.addMessage(new IntWritable(minDist)); > return bundle; > } > } > {code} > By the way, unfortunately, MapWritable was used to send destination VertexID together. > {code} > for (Entry e : msg.entrySet()) { > String vertexID = ((Text) e.getKey()).toString(); > Writable value = e.getValue(); > {code} > Should we implement Graph's own Combiners? or use anyhow BSP's combiner function? -- 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