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 96854200C85 for ; Tue, 30 May 2017 10:44:38 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 95119160BC9; Tue, 30 May 2017 08:44:38 +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 DA5BA160BC1 for ; Tue, 30 May 2017 10:44:37 +0200 (CEST) Received: (qmail 3100 invoked by uid 500); 30 May 2017 08:44:36 -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 3089 invoked by uid 99); 30 May 2017 08:44:36 -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; Tue, 30 May 2017 08:44:36 +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 8411E1A04C9 for ; Tue, 30 May 2017 08:44:36 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.48 X-Spam-Level: X-Spam-Status: No, score=0.48 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=data-artisans-com.20150623.gappssmtp.com 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 3Rvf53r3aI2j for ; Tue, 30 May 2017 08:44:34 +0000 (UTC) Received: from mail-wm0-f41.google.com (mail-wm0-f41.google.com [74.125.82.41]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 875045F3FE for ; Tue, 30 May 2017 08:44:33 +0000 (UTC) Received: by mail-wm0-f41.google.com with SMTP id 7so82401977wmo.1 for ; Tue, 30 May 2017 01:44:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=data-artisans-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:organization:in-reply-to :references:mime-version; bh=VNrzcBGy7BGO1E5fUd7oUU4dli14AtVPG8oJ7pfQz6A=; b=gi5pq29JjHNFOIUyDfwdr2PXoBioCqwvGj+GyTtIkl1gPmWf2cJkrqLtgDb+2bIn7M nJKFLkYBPvLRkBakRGNfc1osVwnisUX5/t6qTkpoUbU22HDF85swqgmXYjJIygvtqeeh l/wm/UKr35F7YZdI8blLacW38Fod1zlh2Z+fRBRZSgPqp9539Lim/acz+Wj1gWohdy/F EP4rhO0tOqgUOFMwsEcoR6sL21B2h3aQ+bZnZX6SsBSZ9+ep1g15EVb5Rbv0rn6z85sG BiSal5g/J2UU+rCjrdaJxvDGFclN3Km32EmSWo7pPppIaXh3878pJcP+NWJbFu4OwlNE b+1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :in-reply-to:references:mime-version; bh=VNrzcBGy7BGO1E5fUd7oUU4dli14AtVPG8oJ7pfQz6A=; b=dEZKjR5vSqH89xGvxm/cR62uq91mKQUADx4e1iTG+QJ4TOPkQMgvA5OaW7hBQogo/m zs0/Xg8wQZ26G+Zeqw3vOOfUoDFZuDvpr50Rxx4hqwcR8RIqpECezWi/QG4XSSKguovm aNjDyoWG74+22fXwkNSmDer2eNNyXqEQNIv+QV4AYm0ysBDYRRoE5SP5//6N1p7bBFu8 Dh3CpNJ1mzuIQDFJmRzx26SN38EGlqjNyPK/va05+62gVNlH1W0WMOpqcaVyRADSaTqF hoV5ZvRrEemRn/YFIMjyWQFytQUPWfXNmYCMQSkzqchYPsYOYaLcd/3tX54tQnavdnW+ Kgrg== X-Gm-Message-State: AODbwcCTVbSUTJHV+JqqWAGu5ndBvqtZZVqfWqT7x5kGgrrZVdenFCAy AtOwhbayO2SA9ASGxr0= X-Received: by 10.223.174.202 with SMTP id y68mr5690797wrc.142.1496133866691; Tue, 30 May 2017 01:44:26 -0700 (PDT) Received: from nico-work.localnet (dslb-084-059-068-070.084.059.pools.vodafone-ip.de. [84.59.68.70]) by smtp.gmail.com with ESMTPSA id x17sm7240034wrd.63.2017.05.30.01.44.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 30 May 2017 01:44:26 -0700 (PDT) From: Nico Kruber To: user@flink.apache.org Cc: Daniel Dalek Subject: Re: Gelly and degree filtering Date: Tue, 30 May 2017 10:44:18 +0200 Message-ID: <5648796.aWQuyHgHxn@nico-work> Organization: data Artisans In-Reply-To: References: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1803409.d38b8qde1Z"; micalg="pgp-sha1"; protocol="application/pgp-signature" archived-at: Tue, 30 May 2017 08:44:38 -0000 --nextPart1803409.d38b8qde1Z Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Does Martin's answer to a similar thread help? https://lists.apache.org/thread.html/ 000af2fb17a883b60f4a2359ebbeca42e3160c2167a88995c2ee28c2@ %3Cuser.flink.apache.org%3E On Monday, 29 May 2017 19:38:20 CEST Martin Junghanns wrote: > 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 Sunday, 28 May 2017 12:02:52 CEST Daniel Dalek wrote: > Hi all, > > I have a question related to Gelly and graph filtering and hoping to get > some pointers/input. > > Basically I have a bipartite graph prepared for a signal/collect iteration, > but want to prune it first to only include target nodes with x or more > edges (indegree >= x). To filter on vertex value (or id) it seems > straightforward to use subgraph and FilterFunction: > > prunedG = graph.subgraph( > new FilterFunction>() { > public boolean filter(Vertex vertex) { > return (vertex.getValue() > 0); > } > }, ... > > > Modifying this to call something like "return (vertex.getInDegree() >=x)" > seemed appropriate but the degree information is in the graph (or available > as separate methods when running GatherFunction etc), and not accessible > directly from the vertex object inside the filter function. > > Any suggestions on how to accomplish this? --nextPart1803409.d38b8qde1Z Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQTIh4KsbsNd3l7wd+cg8nJL2uqeWQUCWS0w4gAKCRAg8nJL2uqe WRocAJ0UBKy3upkYI0QR0t0tbAWkpJT8RACgvrakU9tpwuhR8o5WNKaFlDWI/3s= =y/Y0 -----END PGP SIGNATURE----- --nextPart1803409.d38b8qde1Z--