Return-Path: X-Original-To: apmail-giraph-user-archive@www.apache.org Delivered-To: apmail-giraph-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0DEE010B02 for ; Sun, 17 Nov 2013 09:48:31 +0000 (UTC) Received: (qmail 53387 invoked by uid 500); 17 Nov 2013 09:48:27 -0000 Delivered-To: apmail-giraph-user-archive@giraph.apache.org Received: (qmail 53342 invoked by uid 500); 17 Nov 2013 09:48:26 -0000 Mailing-List: contact user-help@giraph.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@giraph.apache.org Delivered-To: mailing list user@giraph.apache.org Received: (qmail 53334 invoked by uid 99); 17 Nov 2013 09:48:25 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 17 Nov 2013 09:48:25 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of ameya.vilankar@gmail.com designates 209.85.128.170 as permitted sender) Received: from [209.85.128.170] (HELO mail-ve0-f170.google.com) (209.85.128.170) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 17 Nov 2013 09:48:18 +0000 Received: by mail-ve0-f170.google.com with SMTP id oy12so115100veb.15 for ; Sun, 17 Nov 2013 01:47:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=AnHl1lnZ9z53XHlQLT96ssXT9ISqvd+jAgMgirkQWAM=; b=0OViNl1kpFv5s2I1OhQcfIObAhHkieE8ZPc8CCqxpbJJ5HSFZw5HCjSpoNyOocQVtM PIsct0JCegLsWtFuu1xpPZ6yA3EfAaQPO4Htn2pb4txrTsRA9HEHuIpQCIfHud3iRLhP dKXMyZq/VuiwT1f5QiimwXTyztl126C2gvTvpApC1l9Z6MbewS7QWLQ7sUE/6oChk8rx 49JzEt5+tY8gpxWpo0PJBMSGCgfXhJs4sue8/J9EfqnZfKuwsDnuEmXWsd2S/0YBn1Sc z68Vzi+1HWtSBHDM7sRcPepSO/z2Rri++SEUMjTd8ecPKkAwEy4ywq0dRXO+asxhFxGH 6Nug== MIME-Version: 1.0 X-Received: by 10.52.230.202 with SMTP id ta10mr286022vdc.41.1384681677984; Sun, 17 Nov 2013 01:47:57 -0800 (PST) Received: by 10.52.35.198 with HTTP; Sun, 17 Nov 2013 01:47:57 -0800 (PST) In-Reply-To: References: Date: Sun, 17 Nov 2013 01:47:57 -0800 Message-ID: Subject: Re: about retaining the variable value... From: Ameya Vilankar To: user@giraph.apache.org Content-Type: multipart/alternative; boundary=089e0111d9268b4a1604eb5c5348 X-Virus-Checked: Checked by ClamAV on apache.org --089e0111d9268b4a1604eb5c5348 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable In your scenario, you want to store some value that is obtained in Superstep 1, so that it is available to a vertex in all the subsequent supersteps. The best place to do that is to store it on the vertex itself. The simplest example is ShortesPath Example where you store the current lowest distance on the vertex, and when you receive a message you update it with the new lowest mistake. I assume that in your program you don't want to update the value after Superstep 1. So don't. Just keep an extra variable in your vertex value class and set it in superstep 1 so that it can be used by the vertex in all the following steps. But if you want to store global information i.e in superstep 1, every vertex computes and stores a value and in the subsequent supersteps, a vertex needs access to the stored values of all the vertices, you need to make those values global. The only way to do it is to use a persistent aggregator. In superstep 1, every vertex computes the value and then sends it to the persistent aggregator that can contain a hashmap from the vertex id to the value. This value will persist across all the supersteps since the aggregator is a persistent one. Will be available to every vertex too. On Sun, Nov 17, 2013 at 1:11 AM, Mirko K=E4mpf w= rote: > Hi, > > if it is a local value, just important for that given vertex, it might > work with a local variable, maybe even a more complex data structure, e.g= . > a Stack or a FIFO buffer, to handle "old" data. I do not consider to > exchange data between vertexes, only within one vertex over time. > > I write this here, to share my idea, but I am not really sure if a Giraph > vertex works like this. It's just how I would try it ... > > But I think we will see a definitive answer soon. > > Have a nice day! > Mirko > > > On Sun, Nov 17, 2013 at 6:55 AM, Jyoti Yadav = wrote: > >> Hi folks... >> >> while executing my program ,i came across a doubt which is creating >> problem... >> >> Scenario.... >> >> In compute() function, >> Suppose in superstep1 each vertex want to save some value so that every >> vertex can use its previously saved value in upcoming supersteps...Is i= t >> possible??? >> >> >> Any ideas are really appreciated... >> >> Thanks... >> Jyoti >> >> >> >> > > > --089e0111d9268b4a1604eb5c5348 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
In your scenario, you want to store some value that i= s obtained in Superstep 1, so that it is available to a vertex in all the s= ubsequent supersteps. The best place to do that is to store it on the verte= x itself. The simplest example is ShortesPath Example where you store the c= urrent lowest distance on the vertex, and when you receive a message you up= date it with the new lowest mistake. I assume that in your program you don&= #39;t want to update the value after Superstep 1. So don't. Just keep a= n extra variable in your vertex value class and set it in superstep 1 so th= at it can be used by the vertex in all the following steps.

But if you want to store global information i.e in supe= rstep 1, every vertex computes and stores a value and in the subsequent sup= ersteps, a vertex needs access to the stored values of all the vertices, yo= u need to make those values global. The only way to do it is to use a persi= stent aggregator. In superstep 1, every vertex computes the value and then = sends it to the persistent aggregator that can contain a hashmap from the v= ertex id to the value. This value will persist across all the supersteps si= nce the aggregator is a persistent one. Will be available to every vertex t= oo.


On Sun,= Nov 17, 2013 at 1:11 AM, Mirko K=E4mpf <mirko.kaempf@cloudera.com= > wrote:
Hi,

if i= t is a local value, just important for that given vertex, it might work wit= h a local variable, maybe even a more complex data structure, e.g. a Stack = or a FIFO buffer, to handle "old" data. I do not consider to exch= ange data between vertexes, only within one vertex over time.=A0

I write this here, to share my idea, but I am not reall= y sure if a Giraph vertex works like this.=A0It's just how I would try = it ...=A0

But I think we will see a definitive ans= wer soon.

Have a nice day!
Mirko


On Sun, Nov 17, 2013 = at 6:55 AM, Jyoti Yadav <rao.jyoti26yadav@gmail.com> wrote:
Hi folks...

while executing my program ,i came across a dou= bt which is creating problem...

Scenario....

In compute() function,
Suppose in superstep1 each vertex want to save some value so that every ver= tex can use its=A0 previously saved value in upcoming supersteps...Is it po= ssible???


Any ideas are really appreciated...

Thanks...
Jyoti


=




--089e0111d9268b4a1604eb5c5348--