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 2BCC81057D for ; Wed, 24 Jul 2013 20:32:16 +0000 (UTC) Received: (qmail 62060 invoked by uid 500); 24 Jul 2013 20:32:16 -0000 Delivered-To: apmail-giraph-user-archive@giraph.apache.org Received: (qmail 62027 invoked by uid 500); 24 Jul 2013 20:32:15 -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 62018 invoked by uid 99); 24 Jul 2013 20:32:15 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 24 Jul 2013 20:32:15 +0000 X-ASF-Spam-Status: No, hits=0.3 required=5.0 tests=FREEMAIL_REPLY,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of kyle.r.orlando@gmail.com designates 209.85.219.45 as permitted sender) Received: from [209.85.219.45] (HELO mail-oa0-f45.google.com) (209.85.219.45) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 24 Jul 2013 20:32:08 +0000 Received: by mail-oa0-f45.google.com with SMTP id j1so2188712oag.18 for ; Wed, 24 Jul 2013 13:31:47 -0700 (PDT) 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=JQ5ZERTZ+SN1lzwO/EW1+OyEYv2LHy4g7cDDrJy49PY=; b=qL5AV43G6rpOWvsD/ni5Od4bccRtakCzcmFU4EY5ZqIZ9jkkaVey83rCYsoSkUhI0m 98dPwtmZDSJVEsquChukkyJc4DMGWWDipdgxd2wQ+ZAaSeG34nhetAa4gailL+Oyccvh n1P5JuugDao5E/5eeyidgL/v11IjrGCREzV33I1RtC3uTpld0qAAHzYtRxP6IuXd/p0h ObH1zflb55yE+UBt3WGMBeIv3pvOBeNi4FplCb2EDpchSXh9Ks0xNYCRDsKUNg3DyTye iDtUbzJVRES1Ut2kxYCn7UMGwT71VA9sGmZc/hag03WQ6v4+5RvYI/wTwkXXbGhaK3uV 6hzg== 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; bh=JQ5ZERTZ+SN1lzwO/EW1+OyEYv2LHy4g7cDDrJy49PY=; b=I3Pa7cbI+imLjn5sJyC5zWlCMUp40CipZ+AbkEanskG3O5J+nPiHmT47adAaigdYUI Ugdnc9VSJbnksy50Ry57/ilpdN+vmjHiqYp1VjUdlccunWZo5yXXSaTWrHA4X8cnMU3H kQRvb6KHrU2sRKqXO54mWQ/Ir0alRF6RYI8GeFVKyBkRdkKETByog/xV1QIBYSxhWR4p XZeaEFgCFcahoF7CcBB9SRIDITSlt2W1PuiP0rieDU9waMnaTVl5HR0jEEcuRjJEs7Ct uikmhlPu1a1oWktm1Bd3L/C0glM+3JUMbqnts7DES+XYSBBV3YdePfOLuPkZ2n4GmY5T oSKA== MIME-Version: 1.0 X-Received: by 10.50.119.8 with SMTP id kq8mr660610igb.31.1374697907274; Wed, 24 Jul 2013 13:31:47 -0700 (PDT) Received: by 10.42.253.196 with HTTP; Wed, 24 Jul 2013 13:31:47 -0700 (PDT) In-Reply-To: References: Date: Wed, 24 Jul 2013 16:31:47 -0400 Message-ID: Subject: Re: How to retrieve and display the values aggregated by the aggregators? From: Kyle Orlando To: user@giraph.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org Hi Claudio, So I checked out TextAggregatorWriter and was, initially, still a bit confused on how to use it to write to a text file. That's when I noticed that, in org.apache.giraph.utils.ConfigurationUtils, there is an option "aw", which corresponds to an AggregatorWriterClass. I tried this out when running the SimplePageRankComputation program using my data as input by specifying this as an option: -aw org.apache.giraph.aggregators.TextAggregatorWriter. Here's the full command: hadoop jar /home/hduser/Documents/combined.jar org.apache.giraph.GiraphRunner org.apache.giraph.examples.SimplePageRankComputation -eif StackExchangeParsee.StackExchangeLongFloatTextEdgeInput -vif StackExchangeParsee.StackExchangeLongDoubleTextVertexValueInput -eip /in/gaming_edges.txt -vip /in/gaming_vertices.txt -of org.apache.giraph.io.formats.IdWithValueTextOutputFormat -aw org.apache.giraph.aggregators.TextAggregatorWriter -op /outPR -w 2 -mc org.apache.giraph.examples.SimplePageRankComputation\$SimplePageRankMasterCompute According to TextAggregatorWriter, it, by default, writes to a file called "aggregatorValues". I checked my HDFS, and did not see that particular file. That's when I noticed that there is a configuration "giraph.textAggregatorWriter.frequency", and that by default the frequency is set to "NEVER", which means that nothing is ever created/written to a file for the aggregators. The other two frequencies are "AT_THE_END" and "ALWAYS", which strangely both correspond to the same integer: -1. Could someone explain why this is so? Ignoring the above uncertainty, I surmised that the property "giraph.textAggregatorWriter.frequency" was to be added to my giraph-site.xml. I wanted the "AT_THE_END" frequency, which corresponds to the value of -1. Here's the contents of my giraph-site.xml file: giraph.textAggregatorWriter.frequency -1 I ran the SimplePageRankComputation program again (using the verbose "hadoop jar" command above), and still, I couldn't find "aggregatorValues" on my HDFS. Could someone help me out, or at the very least rectify any misconceptions and uncertainties that I have? On Wed, Jul 24, 2013 at 12:25 PM, Claudio Martella wrote: > Hi Kyle, > > you can check out the AggregatorWriter interface which allows you to do > that. As a matter of fact there is already a class that implements what you > need (org.apache.giraph.aggregators.TextAggregatorWriter). > > Hope it helps. > > > On Wed, Jul 24, 2013 at 5:19 PM, Kyle Orlando > wrote: >> >> Hello, >> >> I am new to Giraph and was just wondering how one could retrieve and >> display the certain global values/statistics that the aggregators keep >> track of. What classes and methods would I use, and would this be >> done in a class that extends VertexOutputFormat, or would it be done >> elsewhere? >> >> As an example, in the provided SimplePageRankComputation in >> org.apache.giraph.examples, there are three aggregators: sum, min, and >> max. I would like to display all of their final values (after the >> final superstep) in some way, such as writing them to a text file. >> >> -- >> Kyle Orlando >> Computer Engineering Major >> University of Maryland > > > > > -- > Claudio Martella > claudio.martella@gmail.com -- Kyle Orlando Computer Engineering Major University of Maryland