Return-Path: X-Original-To: apmail-incubator-giraph-user-archive@minotaur.apache.org Delivered-To: apmail-incubator-giraph-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 40D389B03 for ; Wed, 11 Apr 2012 17:37:45 +0000 (UTC) Received: (qmail 86885 invoked by uid 500); 11 Apr 2012 17:37:45 -0000 Delivered-To: apmail-incubator-giraph-user-archive@incubator.apache.org Received: (qmail 86856 invoked by uid 500); 11 Apr 2012 17:37:45 -0000 Mailing-List: contact giraph-user-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: giraph-user@incubator.apache.org Delivered-To: mailing list giraph-user@incubator.apache.org Received: (qmail 86846 invoked by uid 99); 11 Apr 2012 17:37:45 -0000 Received: from minotaur.apache.org (HELO minotaur.apache.org) (140.211.11.9) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Apr 2012 17:37:45 +0000 Received: from localhost (HELO achingmbp15.local) (127.0.0.1) (smtp-auth username aching, mechanism plain) by minotaur.apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Apr 2012 17:37:44 +0000 Message-ID: <4F85C16A.6020008@apache.org> Date: Wed, 11 Apr 2012 10:37:46 -0700 From: Avery Ching User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:11.0) Gecko/20120327 Thunderbird/11.0.1 MIME-Version: 1.0 To: giraph-user@incubator.apache.org Subject: Re: Does Giraph support labeled graphs? References: <4F85B890.8040300@googlemail.com> In-Reply-To: <4F85B890.8040300@googlemail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit There is no "preferred way" to represent labeled graphs. A close example to your adjacency list idea is LongDoubleDoubleAdjacencyListVertexInputFormat. Hope that helps, Avery On 4/11/12 10:00 AM, Paolo Castagna wrote: > Hi, > I am not sure what's the best way to represent labeled graphs in Giraph. > > Here is my graph (i.e. vertex_id --edge_label_id--> vertex_id ): > > 32 --62--> 115 > 32 --153--> 189 > 32 --200--> 236 > 32 --266--> 303 > 32 --266--> 331 > 32 --266--> 363 > 303 --153--> 407 > 303 --266--> 331 > 331 --153--> 394 > 331 --266--> 32 > ... > > I have code to produce an adjacency list: > > 32 ( 62 115 ) ( 153 189 ) ( 200 236 ) ( 266 303 331 363 ) > 303 ( 153 407 ) ( 266 331 ) > 331 ( 153 394 ) ( 266 32 ) > ... > > What's the bets way to represent labeled graphs with Giraph? > > Correct me if I am wrong, but none of the current VertexInputFormat(s) is good > for this, am I right? > > As a workaround, it is possible to generate an unlabeled adjacency list with > just the edge type someone is interested in, say for example --266--> : > > 32 303 331 363 > 303 331 > 331 32 > ... > > > Cheers, > Paolo > > > PS: > The graph above is RDF, parsed using Apache Jena's RIOT and stored in TDB. > An example of code to generate the adjacency list from TDB indexes is here: > https://github.com/castagna/jena-grande/blob/0667599264527721daea80d56ad3f99e437dcda2/src/main/java/org/apache/jena/grande/examples/RunTdbLowLevel.java