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 4A937200C84 for ; Mon, 29 May 2017 19:38:35 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 497DA160BCE; Mon, 29 May 2017 17:38:35 +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 8F6AE160BC6 for ; Mon, 29 May 2017 19:38:34 +0200 (CEST) Received: (qmail 60130 invoked by uid 500); 29 May 2017 17:38:33 -0000 Mailing-List: contact user-help@flink.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list user@flink.apache.org Received: (qmail 60120 invoked by uid 99); 29 May 2017 17:38:33 -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; Mon, 29 May 2017 17:38:33 +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 3D3F11A026B for ; Mon, 29 May 2017 17:38:33 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.802 X-Spam-Level: X-Spam-Status: No, score=-0.802 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=mailbox.org Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id VpvwfIK40hzK for ; Mon, 29 May 2017 17:38:28 +0000 (UTC) Received: from mx2.mailbox.org (mx2.mailbox.org [80.241.60.215]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 3BFD45FC7F for ; Mon, 29 May 2017 17:38:28 +0000 (UTC) Received: from smtp1.mailbox.org (smtp1.mailbox.org [80.241.60.240]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx2.mailbox.org (Postfix) with ESMTPS id 6E2F445306 for ; Mon, 29 May 2017 19:38:22 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mailbox.org; h= content-language:content-transfer-encoding:content-type :content-type:in-reply-to:mime-version:date:date:message-id:from :from:references:subject:subject:received; s=mail20150812; t= 1496079500; bh=iKVD+U+zxzgCIUsfm3DSJHNCz+t2Z2qlRTne4yfr1oQ=; b=O MiA1jOToQTYV+Jrdbqf00Mh801xW3j6+5V3MZl3ZyBarz8DYQBHhSvLW/URxY+dN 8AZGnP+biEQuFnhZSchZm8hl+RDyx3TuePo1D2//+aU6V+Esm4IUnp+SfHQL7Pk/ Qkxax8T8VO1Alyjn3FyKKRdTm0XfntX1c6bxrgmbuC7PaJ4eSA98vaqLySbLCSYP cif3q3n40ba8eE9gloqNpN/eooTU1ocfXkOuRba8PG1x+71FVnHaUAYEnXQG4nBN 2nwa+lRVxngsGks0NvCiV4xZd5UvvssOkZH+OTtrH4X+f3dm9xY1Tgn7sv2mvJkf ZY5vJENYdqGJ3n0rsBHJA== X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp1.mailbox.org ([80.241.60.240]) by hefe.heinlein-support.de (hefe.heinlein-support.de [91.198.250.172]) (amavisd-new, port 10030) with ESMTP id 51Er2xJm_y1o for ; Mon, 29 May 2017 19:38:20 +0200 (CEST) Subject: Re: VertexUpdateFunction To: user@flink.apache.org References: <20170529092815.Horde.RboFL3-0rrZWb9uJHuSQ-Xs@mail.uni-leipzig.de> From: Martin Junghanns Message-ID: Date: Mon, 29 May 2017 19:38:20 +0200 MIME-Version: 1.0 In-Reply-To: <20170529092815.Horde.RboFL3-0rrZWb9uJHuSQ-Xs@mail.uni-leipzig.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US archived-at: Mon, 29 May 2017 17:38:35 -0000 Hi Ali :) You could compute the degrees beforehand (e.g. using the Graph.[in|out|get]degrees()) methods and use the resulting dataset as a new vertex dataset. You can now run your vertex-centric computation and access the degrees as vertex value. Cheers, Martin On 29.05.2017 09:28, rostami@informatik.uni-leipzig.de wrote: > Hi, > > I want to write an iterative algorithm using Gelly (spargel), like: > > https://ci.apache.org/projects/flink/flink-docs-release-0.8/spargel_guide.html > > > My question is how I can access the actual vertex information like the > vertex degree (in- or outdegree) > under the subclass of VertexUpdateFunction. A way is maybe to send an > instance of graph to the constructor. > However, getting the degree for a vertex in each instance of this > subclass would be really inefficient. > > Thanks, > Ali >