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 DBB6291AD for ; Thu, 17 May 2012 08:20:27 +0000 (UTC) Received: (qmail 94358 invoked by uid 500); 17 May 2012 08:20:27 -0000 Delivered-To: apmail-incubator-hama-dev-archive@incubator.apache.org Received: (qmail 94200 invoked by uid 500); 17 May 2012 08:20:24 -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 94147 invoked by uid 99); 17 May 2012 08:20:23 -0000 Received: from minotaur.apache.org (HELO minotaur.apache.org) (140.211.11.9) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 May 2012 08:20:23 +0000 Received: from localhost (HELO mail-pb0-f47.google.com) (127.0.0.1) (smtp-auth username edwardyoon, mechanism plain) by minotaur.apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 May 2012 08:20:23 +0000 Received: by pbbrq2 with SMTP id rq2so2004840pbb.6 for ; Thu, 17 May 2012 01:20:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding:x-gm-message-state; bh=0wnrBOfGZfMxBhUw5TGYW9Vuil878X1Q0c0dN7tfOMw=; b=pO2RG+HCflVjbhzvOJTLaXr/MThnEAyVwP/Xjianf5raWahJbcm7SF7WHYaTMfIuIp 7Jhx5z5wnzURzPuXdfK3KWQj8tQZr7CkEUYia4ztRVbiVyGmeXnV22nE6V8HKEdQ8Iff fV6vIl73LzQybLvlmA/aVi/81uy3VFXi0meNmvdcnUDips0ZjhacEfALhdst+9wDgizT 1X9nryb7VPXbQzE7zzNUOmt5kliYBFuWhUzkuTVLXlvtF8obXRrH0VFtKraR4ew6xijy roG4HPoCFuJRzOQiIJB9WG1MSFRW2i3rMd+inYUh0PWrT2l9Ac9jLoWG7yfyv/Mi82Aa /Gvw== MIME-Version: 1.0 Received: by 10.68.131.37 with SMTP id oj5mr4802803pbb.144.1337242822731; Thu, 17 May 2012 01:20:22 -0700 (PDT) Received: by 10.143.34.5 with HTTP; Thu, 17 May 2012 01:20:22 -0700 (PDT) In-Reply-To: References: Date: Thu, 17 May 2012 17:20:22 +0900 Message-ID: Subject: Re: Hama receive queue From: "Edward J. Yoon" To: hama-dev@incubator.apache.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Gm-Message-State: ALoCoQnd6POa8AFC+dsOirXzusErYGZi57TdqTqOXREbojvOA2033YKvhQ4pu+Nf+09AsRuvmY4Z If it's not urgent I'll help benchmark. On Thu, May 17, 2012 at 4:39 PM, Aditya Sarawgi wrote: > Thanks Thomas. > I am actually using tags for something else. So for now using instanceof = is > just fine with me. > > I had a couple of more questions, regarding benchmarking stuff on hama. I > have a working implementation =C2=A0of > Parallel row based icf that given a n x n matrix returns a decomposed n x= p > matrix. > > https://github.com/truncs/hello-world/blob/master/src/main/java/edu/sunys= b/cs/Icf.java > > Now I would like to test this on a big input and possibly in full > distributed mode, so I was wondering how do > people usually do these sort of benchmarking. > > Specifically, > 1) Do they setup a cluster on AWS ? > 2) What is like the standard way to load matrices in different nodes with= a > custom partitioning scheme > 3) Is there anything else that I should know > > On Thu, May 17, 2012 at 3:20 AM, Thomas Jungblut < > thomas.jungblut@googlemail.com> wrote: > >> Hi Aditya, >> >> that's where the concept of Message Tagging comes into play. You have ta= gs >> in each message which are hardcoded as Strings. >> But as Edward told you can use GenericWritable or ObjectWritable instead= , >> so they will tag your messages with the classnames and give you the corr= ect >> class. >> >> Is there any way by which I can pop from the receive queue ? >> >> >> peer.getCurrentMessage() is popping from the received queue. >> >> 2012/5/17 Aditya Sarawgi >> >> > Hi, >> > >> > But thats not the only problem, consider this case >> > that there are variable number of messages being sent, so I would have= to >> > maintain >> > counts for each peer pointing to the last unread message. >> > >> > Is there any way by which I can pop from the receive queue ? >> > >> > >> > On Wed, May 16, 2012 at 10:23 PM, Suraj Menon > > >wrote: >> > >> > > Hi, >> > > >> > > Please take a look at this snippet of code copied and modified from >> > > Mapper class to implement your scenario. - >> > > >> > > >> > >> https://github.com/ssmenon/hama/edit/master/hama-mapreduce/src/org/apach= e/hama/computemodel/mapreduce/Trials.java >> > > Between lines 233 to 245 I am able to send different type of message= s. >> > > With type checks and generics you shouldn't be encountering Classcas= t >> > > exception at receiving end too. I am yet to test the next superstep, >> > > shall update you with sample code for the next superstep mimicking >> > > your scenario for receiving. >> > > >> > > For elegance, we have an experimental Superstep#compute >> > > API(org.apache.hama.bsp.Superstep). I have encountered an issue in j= ob >> > > submission framework with this method in distributed mode; fix for >> > > this would be pushed to trunk in next few hours. You can still run i= t >> > > using =C2=A0LocalBSPRunner for now. >> > > >> > > -Suraj >> > > >> > > On Wed, May 16, 2012 at 9:18 PM, Aditya Sarawgi >> > > wrote: >> > > > Hi Edward, >> > > > >> > > > Yes that is what I did >> > > > I wrote an ArrayMessage class (doesn't use generics for now but ca= n >> be >> > > > converted easily) >> > > > >> > > >> > >> https://github.com/truncs/hello-world/blob/master/src/main/java/edu/suny= sb/cs/ArrayMessage.java >> > > > >> > > > But the problem is that I am sending a IntegerMessage before and >> after >> > > > reading the IntegerMessage I am sending >> > > > an ArrayMessage but the previous IntegerMessage is still there. >> > > > >> > > > On Wed, May 16, 2012 at 8:34 PM, Edward J. Yoon < >> edwardyoon@apache.org >> > > >wrote: >> > > > >> > > >> Hi, >> > > >> >> > > >> To send or receive multiple Message types, I think you can use >> > > >> GenericWritable. You can also implement your own GenericMessage a= nd >> > > >> contribute it to our project! >> > > >> >> > > >> Hope this helps you. >> > > >> >> > > >> On Thu, May 17, 2012 at 7:48 AM, Aditya Sarawgi >> > > >> wrote: >> > > >> > Hi Guys, >> > > >> > >> > > >> > I am wondering how do the receive queues in hama work. Consider >> this >> > > case >> > > >> > that I want to sent a different type of BSPMessage in 2 >> consecutive >> > > >> > superstep. >> > > >> > In this first superstep I am sending IntMessage and in the next >> one >> > I >> > > am >> > > >> > sending a ArrayMessage ( custom message class). >> > > >> > >> > > >> > Now in the second super step when I do a >> > > >> > =C2=A0while ((arrayMessage =3D (ArrayMessage) peer.getCurrentMe= ssage()) >> !=3D >> > > >> null) { >> > > >> > >> > > >> > it is throwing a java.lang.ClassCastException, which is obvious >> > since >> > > its >> > > >> > trying to cast IntMessage to ArrayMessage. >> > > >> > I thought the message is dropped from the queue after it is rea= d, >> is >> > > this >> > > >> > not the case ? >> > > >> > And if it is not, how can this be handled elegantly ? >> > > >> > >> > > >> > -- >> > > >> > Cheers, >> > > >> > Aditya Sarawgi >> > > >> >> > > >> >> > > >> >> > > >> -- >> > > >> Best Regards, Edward J. Yoon >> > > >> @eddieyoon >> > > >> >> > > > >> > > > >> > > > >> > > > -- >> > > > Cheers, >> > > > Aditya Sarawgi >> > > >> > >> > >> > >> > -- >> > Cheers, >> > Aditya Sarawgi >> > >> >> >> >> -- >> Thomas Jungblut >> Berlin >> > > > > -- > Cheers, > Aditya Sarawgi --=20 Best Regards, Edward J. Yoon @eddieyoon