Return-Path: X-Original-To: apmail-spark-user-archive@minotaur.apache.org Delivered-To: apmail-spark-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 DD5ED11D14 for ; Tue, 5 Aug 2014 17:19:53 +0000 (UTC) Received: (qmail 76519 invoked by uid 500); 5 Aug 2014 17:19:51 -0000 Delivered-To: apmail-spark-user-archive@spark.apache.org Received: (qmail 76462 invoked by uid 500); 5 Aug 2014 17:19:51 -0000 Mailing-List: contact user-help@spark.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list user@spark.apache.org Received: (qmail 76452 invoked by uid 99); 5 Aug 2014 17:19:51 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Aug 2014 17:19:51 +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 omer.holz@gmail.com designates 209.85.212.176 as permitted sender) Received: from [209.85.212.176] (HELO mail-wi0-f176.google.com) (209.85.212.176) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Aug 2014 17:19:48 +0000 Received: by mail-wi0-f176.google.com with SMTP id bs8so7369922wib.15 for ; Tue, 05 Aug 2014 10:19:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=/g7BfYHuLmez3ItLpU6Yq3WDXEyW/nmHhm2niLjwsrE=; b=N2U7CGHn0XaqFgSTgOB418eBhSsZFks9QKNH3Ept9rbfhcH6uth0ziZIbeSRYeGxWx 9VJoOl84FLKBI0KQFHpyh6A6BELTGSZiUxKHWBTKv5hOe//mfjP4Fsql92NQmi4dq3RR 1iCb9EBlw43zEbaMcPoZVMvPwhRRe2NySQSyNQTuUY74RaiI5JhlD92m1Fy7B8Kpazpb hsKTn468EnlahjjfTh3+F6NCY6HHVecdl7r/S8FiN5ur0v+1B5nK+Lqvi0yGjyRyUS4v 6PDzhd2mG/mbNKIJlxuT55lmwrwdUsvfKu7ujEtClJI0NveubfT4XpbZ7dL0d3pSS3/y +4Kw== X-Received: by 10.194.184.230 with SMTP id ex6mr7664582wjc.83.1407259164370; Tue, 05 Aug 2014 10:19:24 -0700 (PDT) MIME-Version: 1.0 Received: by 10.194.189.135 with HTTP; Tue, 5 Aug 2014 10:18:44 -0700 (PDT) From: Omer Holzinger Date: Tue, 5 Aug 2014 13:18:44 -0400 Message-ID: Subject: graph reduceByKey To: user@spark.apache.org Content-Type: multipart/alternative; boundary=047d7bb708a89973ac04ffe50ec7 X-Virus-Checked: Checked by ClamAV on apache.org --047d7bb708a89973ac04ffe50ec7 Content-Type: text/plain; charset=UTF-8 Hey all! I'm a total beginner with spark / hadoop / graph computation so please excuse my beginner question. I've created a graph, using graphx. Now, for every vertex, I want to get all its second degree neighbors. so if my graph is: v1 --> v2 v1 --> v4 v1 --> v6 I want to get something like: v2 --> v4 v2 --> v6 v4 --> v2 v4 --> v6 v6 --> v2 v6 --> v4 Does anyone have advice on what will be the best way to do that over a graph instance? I attempted to do it using mapReduceTriplets but I need the reduce function to work like reduceByKey, which I wasn't able to do. Thank you. -- Omer --047d7bb708a89973ac04ffe50ec7 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hey all!

I'm a total beginner with spark / hadoop / graph computation so please = excuse my beginner question.

I've created a graph, using graphx. Now, for every vertex, I want to ge= t all its second degree neighbors.
so if my graph is:
v1 --> v2
v1 --> v4
v1 --> v6

I want to get something like:
v2 --> v4
v2 --> v6
v4 --> v2
v4 --> v6
v6 --> v2
v6 --> v4

Does anyone have advice on what will be the best way to do that over a grap= h instance?
I attempted to do it using=C2=A0mapReduceTriplets but I= need the reduce function to work like reduceByKey, which I wasn't able= to do.
<= br>
Thank you.

=C2=A0 -- Omer


--047d7bb708a89973ac04ffe50ec7--