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 73159200CA3 for ; Thu, 1 Jun 2017 08:46:01 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 71A43160BB5; Thu, 1 Jun 2017 06:46:01 +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 B7E72160BC4 for ; Thu, 1 Jun 2017 08:46:00 +0200 (CEST) Received: (qmail 15832 invoked by uid 500); 1 Jun 2017 06:45:59 -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 15821 invoked by uid 99); 1 Jun 2017 06:45:59 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Jun 2017 06:45:59 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 29515CEB8A for ; Thu, 1 Jun 2017 06:45:59 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.801 X-Spam-Level: X-Spam-Status: No, score=-0.801 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, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=mailbox.org Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id qZinv2M3xrKA for ; Thu, 1 Jun 2017 06:45:54 +0000 (UTC) Received: from mx2.mailbox.org (mx2.mailbox.org [80.241.60.215]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 631DD5FBB8 for ; Thu, 1 Jun 2017 06:45:54 +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 412D744EAE for ; Thu, 1 Jun 2017 08:45:53 +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= 1496299551; bh=4eA2uuQNWA7kC5g7l6R3n//k5S5JM/uWgonX7sGdsyk=; b=s IWd+kE/Xu2A5s1WF9RTuqO045d0C4+24keD/xNFnNDWBsh58Jkvhr/qhkyoOkDW8 WyzowZOFk3VblHkdrDee6z82+h+nLWOuAdXoF0hqqLcCcpmsnsKXDQQzr+IbdaDO Lit7YKQHcca8q7zKoolvD+72yKNb9VjvkPuKBRvEfHGN6W11bCMvd49bt49Abgl4 CZDVYVm1CCZaTRWxKO1CaZAAi3EWoCAEZZqIA8iGNep19QMfJfNbXbbtX+RuURWT tcRhlEwjjoSpz9eq7Wi1XHz1pHHXnMviiaCcslFsDf0+uxT3+Z4x8nguy2y/OsjN PSMJ6B8dQg49iC6iXri1A== X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp1.mailbox.org ([80.241.60.240]) by spamfilter03.heinlein-hosting.de (spamfilter03.heinlein-hosting.de [80.241.56.117]) (amavisd-new, port 10030) with ESMTP id M-2zM_RQMhQb for ; Thu, 1 Jun 2017 08:45:51 +0200 (CEST) Subject: Re: VertexUpdateFunction To: user@flink.apache.org References: <20170529092815.Horde.RboFL3-0rrZWb9uJHuSQ-Xs@mail.uni-leipzig.de> <20170531141909.Horde.3FGVU_9HfQRWROLlzs2lsGZ@mail.uni-leipzig.de> From: Martin Junghanns Message-ID: Date: Thu, 1 Jun 2017 08:45:50 +0200 MIME-Version: 1.0 In-Reply-To: <20170531141909.Horde.3FGVU_9HfQRWROLlzs2lsGZ@mail.uni-leipzig.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US archived-at: Thu, 01 Jun 2017 06:46:01 -0000 Hi Ali, If you're talking about a Java Map and the constructor of your compute function, then your implementation is not really scalable. Cheers, Martin On 31.05.2017 14:19, rostami@informatik.uni-leipzig.de wrote: > Hi Martin, > > thanks for your answer.. > For the vertex degree, I passed a map (vertex_id -> degree) to the > constructor. > > Regards, > Ali > > Zitat von Martin Junghanns : > >> 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 >>> > > >