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 A5BC1200B64 for ; Tue, 2 Aug 2016 14:29:23 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id A456E160A8C; Tue, 2 Aug 2016 12:29:23 +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 EA757160A76 for ; Tue, 2 Aug 2016 14:29:22 +0200 (CEST) Received: (qmail 14280 invoked by uid 500); 2 Aug 2016 12:29:21 -0000 Mailing-List: contact dev-help@spark.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@spark.apache.org Received: (qmail 14266 invoked by uid 99); 2 Aug 2016 12:29:21 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Aug 2016 12:29:21 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id DB114C0B71 for ; Tue, 2 Aug 2016 12:29:20 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 3.593 X-Spam-Level: *** X-Spam-Status: No, score=3.593 tagged_above=-999 required=6.31 tests=[HTML_MESSAGE=2, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_WEB=0.614, SPF_HELO_PASS=-0.001] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id Dt1bsbz4YL2W for ; Tue, 2 Aug 2016 12:29:19 +0000 (UTC) Received: from NAM02-CY1-obe.outbound.protection.outlook.com (mail-cys01nam02on0134.outbound.protection.outlook.com [104.47.37.134]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 5B21F5F39E for ; Tue, 2 Aug 2016 12:29:19 +0000 (UTC) Received: from DF4PR84MB0313.NAMPRD84.PROD.OUTLOOK.COM (10.162.193.27) by DF4PR84MB0315.NAMPRD84.PROD.OUTLOOK.COM (10.162.193.29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.549.15; Tue, 2 Aug 2016 12:29:10 +0000 Received: from DF4PR84MB0313.NAMPRD84.PROD.OUTLOOK.COM ([10.162.193.27]) by DF4PR84MB0313.NAMPRD84.PROD.OUTLOOK.COM ([10.162.193.27]) with mapi id 15.01.0549.022; Tue, 2 Aug 2016 12:29:10 +0000 From: "Ulanov, Alexander" To: "dev@spark.apache.org" Subject: Graph edge type pattern matching in GraphX Thread-Topic: Graph edge type pattern matching in GraphX Thread-Index: AdHsuWAG891cYGRsRpiPLRacym3rkA== Date: Tue, 2 Aug 2016 12:29:10 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=alexander.ulanov@hpe.com; x-originating-ip: [78.25.122.38] x-ms-office365-filtering-correlation-id: a87e73cf-5c0c-45ff-a89a-08d3bad09aff x-microsoft-exchange-diagnostics: 1;DF4PR84MB0315;6:ZVLJfn99T4eKZZ7rowl5TGUGuEzXsKmlN3UZrnykr9w9TEXEVoSIkDW9ZVTJLBue7VRQwA/nJjYRGAqWz8mnY2q+ikt+z6xvPSN3AvVCIpNwj/VmkkhmVoy8bda6P04Mm03NO01sSwNcW/N6snu5YnrUrWJL75bqvv1WM5C4LAM/2BR1cAKOC3LgjeT8tzUaAoTrKv9OIxWcLVHb3dEkxdczlO2tHh+qCot92KNjrNf4MsQsWv3pmryD7yKHvFmkrXdj9nIHG7UNgd2hpuc5ucnxwVgkc2stvLi1lgAYYQM7S7rRcUwD0JR7hdG/5uXSdgZnQnTah1ox/7lQAc3qYQ==;5:OCJhAfVFGsSGVwG9fP8lHNqaouSjkWkHG2kKWeUsAQJjJOoGJbHpB29dxfZ1uPEIph+Pe2AYU3tHKzyFDmlgStPm5FC+EP9yxS2XzP7ioWB+DzuHl5gqeEP90LSoGflc35sVs8vALwB6XR/F9pNnqQ==;24:CWHLFH+6sX/q2kKJ2n4G8Xyq/yuMjlSMLJzdR5R6VArHuPKyTGBTGP9vLh8iaEY+xU5TmWJl+DHZi2xz3TVsq42HChhiRz2aLPMFCL6h/Wk=;7:U1MmJlMuOVFaEVLqy1ibmPccP/e9Xnv3UkoKB8CJ+ghZdDXDT8Rk2I0ckWG5fBJ71eQ1ckXeAA9k17eRGRJMNRdsfDa9GfOc7/koEMvuYvqE/F8P/LtBin/WtZZapa0k1qj1CrhlBG0YTsdzkaXr9LXLDjOqgFQ4MVrD+VykxyPxXfTaU6WExPcM1qc5POk05v7weH5pRI8D6/ZUbQmnaKgOdOaAY+6qHEkjemEOroy4frMEisxOVPDyHn4Nm6YH x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DF4PR84MB0315; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(21748063052155); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(6055026);SRVR:DF4PR84MB0315;BCL:0;PCL:0;RULEID:;SRVR:DF4PR84MB0315; x-forefront-prvs: 0022134A87 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(7916002)(199003)(189002)(450100001)(122556002)(105586002)(86362001)(19625215002)(2900100001)(77096005)(16236675004)(99286002)(7736002)(19580395003)(81166006)(33656002)(3280700002)(81156014)(1730700003)(3660700001)(15975445007)(8936002)(9686002)(87936001)(2501003)(66066001)(229853001)(68736007)(54356999)(50986999)(790700001)(8676002)(189998001)(2351001)(2906002)(92566002)(19300405004)(10400500002)(110136002)(11100500001)(97736004)(101416001)(107886002)(3846002)(7696003)(106356001)(586003)(102836003)(6116002)(74316002)(7846002)(5002640100001);DIR:OUT;SFP:1102;SCL:1;SRVR:DF4PR84MB0315;H:DF4PR84MB0313.NAMPRD84.PROD.OUTLOOK.COM;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; received-spf: None (protection.outlook.com: hpe.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: multipart/alternative; boundary="_000_DF4PR84MB031390A3676612A6F7F5404D85050DF4PR84MB0313NAMP_" MIME-Version: 1.0 X-OriginatorOrg: hpe.com X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Aug 2016 12:29:10.2188 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 105b2061-b669-4b31-92ac-24d304d195dc X-MS-Exchange-Transport-CrossTenantHeadersStamped: DF4PR84MB0315 archived-at: Tue, 02 Aug 2016 12:29:23 -0000 --_000_DF4PR84MB031390A3676612A6F7F5404D85050DF4PR84MB0313NAMP_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Dear Spark developers, Could you suggest how to perform pattern matching on the type of the graph = edge in the following scenario. I need to perform some math by means of agg= regateMessages on the graph edges if edges are Double. Here is the code: def my[VD: ClassTag, ED: ClassTag] (graph: Graph[VD, ED]): Double { graph match { g: Graph[_, Double] =3D> g.aggregateMessages[Double](t =3D> t.sendToSrc(= t.attr), _ + _).values.max _ =3D> 0.0 } } However, it does not work, because aggregateMessages creates context t of t= ype [VD, ED, Double]. I expect it to create context of [VD, Double, Double]= because of the type pattern matching. Could you suggest what is the issue? Best regards, Alexander --_000_DF4PR84MB031390A3676612A6F7F5404D85050DF4PR84MB0313NAMP_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Dear Spark developers,

 

Could you suggest how to perform pattern matching on= the type of the graph edge in the following scenario. I need to perform so= me math by means of aggregateMessages on the graph edges if edges are Doubl= e. Here is the code:

def my[VD: ClassTag, ED: ClassTag] (graph: Graph[VD,= ED]): Double {

graph match {

   g: Graph[_, Double] =3D> g.aggregate= Messages[Double](t =3D> t.sendToSrc(t.attr), _ + _).values.max<= /o:p>

   _ =3D> 0.0

}

}

 

However, it does not work, because aggregateMessages= creates context t of type [VD, ED, Double]. I expect it to create context = of [VD, Double, Double] because of the type pattern matching. Could you sug= gest what is the issue?

 

Best regards, Alexander

--_000_DF4PR84MB031390A3676612A6F7F5404D85050DF4PR84MB0313NAMP_--