Return-Path: X-Original-To: apmail-hama-dev-archive@www.apache.org Delivered-To: apmail-hama-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 066D010940 for ; Thu, 23 Jan 2014 13:53:47 +0000 (UTC) Received: (qmail 21760 invoked by uid 500); 23 Jan 2014 13:53:46 -0000 Delivered-To: apmail-hama-dev-archive@hama.apache.org Received: (qmail 21642 invoked by uid 500); 23 Jan 2014 13:53:44 -0000 Mailing-List: contact dev-help@hama.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hama.apache.org Delivered-To: mailing list dev@hama.apache.org Received: (qmail 21627 invoked by uid 99); 23 Jan 2014 13:53:43 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Jan 2014 13:53:43 +0000 X-ASF-Spam-Status: No, hits=0.5 required=5.0 tests=FH_RANDOM_SURE,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of andronat_asf@hotmail.com designates 65.55.111.147 as permitted sender) Received: from [65.55.111.147] (HELO blu0-omc4-s8.blu0.hotmail.com) (65.55.111.147) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Jan 2014 13:53:36 +0000 Received: from BLU0-SMTP472 ([65.55.111.136]) by blu0-omc4-s8.blu0.hotmail.com with Microsoft SMTPSVC(6.0.3790.4675); Thu, 23 Jan 2014 05:53:16 -0800 X-TMN: [7auH53+zD8Yq1N5OSTzL2M92pmyfdWqmzPwTpnv2Bpg=] X-Originating-Email: [andronat_asf@hotmail.com] Message-ID: Received: from pb-d-128-141-153-177.cern.ch ([128.141.153.177]) by BLU0-SMTP472.phx.gbl over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Thu, 23 Jan 2014 05:53:13 -0800 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 (Mac OS X Mail 7.1 \(1827\)) Subject: Re: Bug in Aggregator From: Anastasis Andronidis In-Reply-To: Date: Thu, 23 Jan 2014 14:53:08 +0100 Content-Transfer-Encoding: quoted-printable References: To: dev@hama.apache.org X-Mailer: Apple Mail (2.1827) X-OriginalArrivalTime: 23 Jan 2014 13:53:13.0795 (UTC) FILETIME=[75A8F930:01CF1842] X-Virus-Checked: Checked by ClamAV on apache.org Sorry, can't see something easy and elegant. For me, the best approach = would be to stay on simple aggregate(name, value). BTW, my patch has other parts that simplify the code. Are you sure that = it's all written wrong? Should I open smaller tickets to do updates? Or = just drop everything? (e.g. named aggregators, etc..) The AbsDiffAggregator is a complicate case. I don't see any convenient = way to support it with a simple interface like vertex.aggregate(name, = value); I don't see a way to interact it with=20 On 23 =CE=99=CE=B1=CE=BD 2014, at 12:14 =CE=BC.=CE=BC., Edward J. Yoon = wrote: > Yes, basically I agree with you. User should handle it. BTW, at the > same time, I don't want to remove AbsDiffAggregator. >=20 > Do you have any good idea? >=20 > On Thu, Jan 23, 2014 at 7:38 PM, Anastasis Andronidis > wrote: >> So you do agree that the user should handle such cases or Hama should = implement different methods to keep track of previous states? >>=20 >> On 23 =CE=99=CE=B1=CE=BD 2014, at 11:31 =CF=80.=CE=BC., Edward J. = Yoon wrote: >>=20 >>> Yes, AbsDiffAggregator. I've uploaded a patch. >>>=20 >>> On Thu, Jan 23, 2014 at 7:21 PM, Anastasis Andronidis >>> wrote: >>>> Hello, >>>>=20 >>>> sorry I am a little bit confused. >>>> if I understand correctly, the problem is that we don't keep the = value of the previous superstep? Isn't this something that the user = should implement on his own? >>>>=20 >>>> I'll take as an example the AbsDiffAggregator: >>>>=20 >>>> This aggregator is taking as an input, the (old value of the = vertex) - (the current value) and then it sums everything across all = vertices. Isn't this the same as making the diff inside the vertex and = then sending the output to a sum aggregator? >>>>=20 >>>> (by the user in Vertex class) >>>>=20 >>>> --- in the beginning of the code --- >>>> startV =3D this.getValue(); >>>>=20 >>>> /* Code run */ >>>>=20 >>>> this.aggregate("sum_aggr", startV - this.getValue()); >>>>=20 >>>> If I am correct, I think that we should document this kind of = behavior, so the users can use it. I said that I will handle the = documentation on the wiki for the aggregators, I have it on schedule for = this weekend. >>>>=20 >>>> Cheers, >>>> Anastasis >>>>=20 >>>> On 23 =CE=99=CE=B1=CE=BD 2014, at 2:30 =CF=80.=CE=BC., Edward J. = Yoon wrote: >>>>=20 >>>>> I found a bug in aggregator. >>>>>=20 >>>>> In parseMessages, you calls masterAggregation() method. Do you = think >>>>> everything is OK? >>>>>=20 >>>>> /** >>>>> * Method to let the custom master aggregator read messages from = peers and >>>>> * aggregate a value. >>>>> */ >>>>> @SuppressWarnings("unchecked") >>>>> public void masterAggregation(Text name, Writable value) { >>>>> String nameIdx =3D name.toString().split(";", 2)[1]; >>>>> this.Aggregators.get(nameIdx).aggregate(null, value); >>>>>=20 >>>>> // When it's time to send the values, we can see which = aggregators are used. >>>>> this.aggregatorsUsed.add(nameIdx); >>>>> } >>>>>=20 >>>>> The aggregated value will be always the last value. >>>>>=20 >>>>> Like our old code, >>>>>=20 >>>>> getAggregationRunner().aggregateVertex(lastValue, vertex); >>>>>=20 >>>>> You should aggregates all values. >>>>>=20 >>>>> -- >>>>> Best Regards, Edward J. Yoon >>>>> @eddieyoon >>>>>=20 >>>>=20 >>>=20 >>>=20 >>>=20 >>> -- >>> Best Regards, Edward J. Yoon >>> @eddieyoon >>>=20 >>=20 >=20 >=20 >=20 > --=20 > Best Regards, Edward J. Yoon > @eddieyoon >=20