Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id F0FFA200C11 for ; Sat, 4 Feb 2017 19:34:00 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id EE844160B63; Sat, 4 Feb 2017 18:34:00 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 107D5160B54 for ; Sat, 4 Feb 2017 19:33:59 +0100 (CET) Received: (qmail 68711 invoked by uid 500); 4 Feb 2017 18:33:59 -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 68701 invoked by uid 99); 4 Feb 2017 18:33:59 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 04 Feb 2017 18:33:59 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id A80E71A02EE for ; Sat, 4 Feb 2017 18:33:58 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.379 X-Spam-Level: ** X-Spam-Status: No, score=2.379 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id iqayqHbN7LZp for ; Sat, 4 Feb 2017 18:33:57 +0000 (UTC) Received: from mail-oi0-f50.google.com (mail-oi0-f50.google.com [209.85.218.50]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 4A8A65F3A1 for ; Sat, 4 Feb 2017 18:33:52 +0000 (UTC) Received: by mail-oi0-f50.google.com with SMTP id u143so28306673oif.3 for ; Sat, 04 Feb 2017 10:33:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=/D1E0w2O0p9rl1h53xjMLDPuWp/c9o/PJiJ2ASNVPDs=; b=QguaXkxo3a5JolqWvvIRsiyZgbYV7YHWv5P8MP+eTLCHde08i42Xw9X91hpqqPDSjh SCoATf5ZqWhlYE9UTUqCvqkqPoL3UTpVkwoGIHrVp/D994G2jC9wOadQ5bVsr/yR+43q 1IhTfbtofzczUiXxE+46+Aqp9/R586N/X5DLWygVbzsHgz4lkTV0/31+AMjGfuKJu2Fu d31MX9zmeYOaaPnS7qiZVmmE2gciqyQRDiRCDRTJHkaSK95Ut7aaUzZYDP3E5WYwMBLB 1DQpMVM9Le3raxlpoEtQc9zjuc3Dt+zJMxYMIwjMkNK3/1v/4upBxsLUT0+hsZhZuWQj Lstw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=/D1E0w2O0p9rl1h53xjMLDPuWp/c9o/PJiJ2ASNVPDs=; b=BGxJP8rd+fsCDImlZduJWBI0eEJ+mWjBFyktusm3Tn2gsdg/5neDHB9Q3f2lQQtfwk JpRvrkyjPLENB3hKS4ZDYSryRkB53f9sLLp7gPsKedjdgUhJ3m//qb2C0JpPoNHrBjQ+ HQru247Isxrvmj1Q6/VsvGC/woQ4g6hl5b78McHK0y2YExO8N0o6KEZQGigXlVGT3c3G Ry8EoG4OwQ11yVa6q+Y8S79Uccak5JYf2ugIB6OUu1tskucJpgnGthV3TwakoybNgbQS 7WepwQ+xWkIfg+f/vWpyh2sNzTTcH2mGNSxXTLus6h2Gr/G6GQTn3Wq+PwlT9Rg0sD/5 KsWA== X-Gm-Message-State: AMke39keSuve9veBRW3B4johcCZ8vAhPqHmGzgtGbVXxTaDGOJ6IENZqrdol6B/dcBQX2w0PLzhm4DPvTvbdyA== X-Received: by 10.202.213.17 with SMTP id m17mr1660752oig.104.1486233227162; Sat, 04 Feb 2017 10:33:47 -0800 (PST) MIME-Version: 1.0 Received: by 10.202.54.87 with HTTP; Sat, 4 Feb 2017 10:33:26 -0800 (PST) In-Reply-To: References: From: =?UTF-8?Q?Jos=C3=A9_Luis_Larroque?= Date: Sat, 4 Feb 2017 15:33:26 -0300 Message-ID: Subject: Re: Return a value from Giraph master superstep To: user@giraph.apache.org Content-Type: multipart/alternative; boundary=001a113b0a388efa420547b8a36f archived-at: Sat, 04 Feb 2017 18:34:01 -0000 --001a113b0a388efa420547b8a36f Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi Saliya, GiraphRunner.run gives you an *int* result, and that result it's different depending of your last superstep execution. It will give 0 in a successfully execution and a error value otherwise. Those values can't be changed but maybe you should save your last superstep custom result in hdfs for example, and try to keep things simple instead of changing Giraph code. Just a idea. Bye! --=20 *Jos=C3=A9 Luis Larroque* Analista Programador Universitario - Facultad de Inform=C3=A1tica - UNLP Desarrollador Java en LIFIA 2017-02-04 14:21 GMT-03:00 Saliya Ekanayake : > Hi, > > I am developing a graph algorithm where I need to do N invocations of > giraph. Each invocation will run some M number of supersteps. I need to > return a value from the last super step back to the main method before > invoking giraph. How can I do this? > > For example, I have, > > main(){ > > for (int i =3D 0; i < N; ++i){ > // Create giraph conf > // Create new Giraph runner > ToolRunner.run(runner, ...) > > // I need to return a value here from this invocation. > } > > -- > Saliya Ekanayake, Ph.D > Applied Computer Scientist > Network Dynamics and Simulation Science Laboratory (NDSSL) > Virginia Tech, Blacksburg > > --001a113b0a388efa420547b8a36f Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi Saliya,

GiraphRunner.run gives= you an int=C2=A0result, and that result it's different dependin= g of your last superstep execution. It will give 0 in a successfully execut= ion and a error value otherwise. Those values can't be changed but mayb= e you should save your last superstep custom result in hdfs for example, an= d try to keep things simple instead of changing Giraph code.

=
Just a idea.
Bye!

--=C2=A0
<= font color=3D"#888888" face=3D"arial" size=3D"1">Jos=C3=A9 Luis Larroque=
Analista Programador Universitario - = Facultad de Inform=C3=A1tica - UNLP
Desarr= ollador Java =C2=A0en LIFIA

2017-02-04 14:21 GMT-03:00 Saliya Ekanayake = <esaliya@gmail.com>:
Hi,

I am developing a graph algorithm where = I need to do N invocations of giraph. Each invocation will run some M numbe= r of supersteps. I need to return a value from the last super step back to = the main method before invoking giraph. How can I do this?

For example, I have,

main(){
=C2=A0 =C2=A0 for (int i =3D 0; i < N; ++i){
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 // Create giraph conf
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 // Create new Giraph runner
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 ToolRunner.run(runner, ...)
=C2=A0 =C2=A0 =C2=A0 =C2=A0
=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 // I need to return a value here from this= invocation.
=C2=A0 =C2=A0 }

--
Saliya Ekanayake, P= h.D
Applied Computer Scientist
Network Dynamics and Simulation Sc= ience Laboratory (NDSSL)
Virginia Tech, Blac= ksburg


--001a113b0a388efa420547b8a36f--