Return-Path: X-Original-To: apmail-flink-dev-archive@www.apache.org Delivered-To: apmail-flink-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A0B311135C for ; Thu, 12 Jun 2014 10:29:28 +0000 (UTC) Received: (qmail 88496 invoked by uid 500); 12 Jun 2014 10:29:28 -0000 Delivered-To: apmail-flink-dev-archive@flink.apache.org Received: (qmail 88440 invoked by uid 500); 12 Jun 2014 10:29:28 -0000 Mailing-List: contact dev-help@flink.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@flink.incubator.apache.org Delivered-To: mailing list dev@flink.incubator.apache.org Delivered-To: moderator for dev@flink.incubator.apache.org Received: (qmail 31546 invoked by uid 99); 12 Jun 2014 07:46:41 -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 (athena.apache.org: domain of vyacheslav.zholudev@gmail.com designates 209.85.160.55 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:message-id:in-reply-to:references:subject :mime-version:content-type; bh=FqlrGgfQGSU7MB3Yc7JLx3Km9maC//TbNR314Di7j0U=; b=zFd2/VcvzaIVjqs4nOcwROiOcPInPHVWzqZpybKY1MmkJs7GAx95dQHoL0pfBrkwKS S0tWZtB+9//x29M0J4QvXtSnVacrM5oIROAhDv/ERhu4az6/JvcnxXXQHscCSdG+WiOJ w5oXGOE/Bqjzrqg6Ivu8QtE1UMn7v6s/UXgjRPzFVOF3C1lXHz6ZqAyHBj3R9TNGEh4f KGzXT1fUmEyJMNRnYqUbq7U/dN0G1CSWmSPVmCfS0FylbSWvphYN49twu9y6etWuX3tB /cC+9DDo3m38n8iB7Wc41O+3z7gu3c//vytipUNJ+3GPGFZ+4YaAsZdHA/XzVoafHRnJ +N6w== X-Received: by 10.140.50.239 with SMTP id s102mr279350qga.7.1402559176049; Thu, 12 Jun 2014 00:46:16 -0700 (PDT) X-Google-Doc-Id: 53d482f055660eb5 X-Google-Web-Client: true Date: Thu, 12 Jun 2014 00:46:14 -0700 (PDT) From: Vyacheslav Zholudev To: stratosphere-dev@googlegroups.com Cc: dev@flink.incubator.apache.org, rmetzger@apache.org Message-Id: <04b67962-c1ba-44ee-a133-0e40521b5fc6@googlegroups.com> In-Reply-To: References: <733371b2-7864-45d3-ba61-d17105554c54@googlegroups.com> Subject: Re: [stratosphere-dev] Grouping by a tuple MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_24_18230749.1402559174800" X-Google-Token: EMa15ZwFMHNFwppohCQ0 X-Google-IP: 85.179.0.184 X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_24_18230749.1402559174800 Content-Type: multipart/alternative; boundary="----=_Part_25_18686558.1402559174800" ------=_Part_25_18686558.1402559174800 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi Robert, thanks, I will post my future questions to that list. Regarding your question: When using the Tuples, you don't need to specify a > keySelector. It is sufficient to specify the ID(s) of the keys: > http://stratosphere-javadocs.github.io/eu/stratosphere/api/java/DataSet.html#groupBy(int.. > .) > So you should be able to do a ".groupBy(0,3,4)" > > Actually my question is about the situation when I don't have tuples. Assume I have a DataSet ds and I want to invoke ds.groupBy(/* grouping by */), the ideal choice would be to return a comparable tuple from the KeySelector. On the side note, would it be possible to generate the clone method for the tuples? Yesterday I was copying a Tuple13 in a groupReduce function by hand and it was a pretty long line of code :) Thanks, Vyacheslav ------=_Part_25_18686558.1402559174800 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
Hi Robert,

thanks, I will post my futur= e questions to that list.

Regarding your question: When using the Tuple= s, you don't need to specify a keySelector. It is sufficient to specify the= ID(s) of the keys: http://stratosphere-javadocs.github.= io/eu/stratosphere/api/java/DataSet.html#groupBy(int...)
So you should be able to do a ".groupBy(0,3,4)"


Actually my question is about th= e situation when I don't have tuples. Assume I have a DataSet<UserData&g= t; ds and I want to invoke ds.groupBy(/* grouping by <userId, sessionId,= dayOfTheYear> */), the ideal choice would be to return a comparable tup= le from the KeySelector.
On the side note, would it be poss= ible to generate the clone method for the tuples? Yesterday I was copying a= Tuple13 in a groupReduce function by hand and it was a pretty long line of= code :)

Thanks,
Vyacheslav
------=_Part_25_18686558.1402559174800-- ------=_Part_24_18230749.1402559174800--