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 61F7718038 for ; Sun, 2 Aug 2015 23:01:10 +0000 (UTC) Received: (qmail 91130 invoked by uid 500); 2 Aug 2015 23:01:10 -0000 Delivered-To: apmail-flink-dev-archive@flink.apache.org Received: (qmail 91074 invoked by uid 500); 2 Aug 2015 23:01:10 -0000 Mailing-List: contact dev-help@flink.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@flink.apache.org Delivered-To: mailing list dev@flink.apache.org Received: (qmail 91061 invoked by uid 99); 2 Aug 2015 23:01:10 -0000 Received: from Unknown (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 02 Aug 2015 23:01:10 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 90E8F198034 for ; Sun, 2 Aug 2015 23:01:09 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.01 X-Spam-Level: X-Spam-Status: No, score=-0.01 tagged_above=-999 required=6.31 tests=[SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-us-west.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id K3Jy9RbWGkfE for ; Sun, 2 Aug 2015 23:01:01 +0000 (UTC) Received: from mailout1.informatik.hu-berlin.de (mailout1.informatik.hu-berlin.de [141.20.20.101]) by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org) with ESMTPS id 73FCD210DF for ; Sun, 2 Aug 2015 23:01:01 +0000 (UTC) Received: from mailbox.informatik.hu-berlin.de (mailbox [141.20.20.63]) by mail.informatik.hu-berlin.de (8.14.7/8.14.7/INF-2.0-MA-SOLARIS-2.10-25) with ESMTP id t72N0o4h029630 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Mon, 3 Aug 2015 01:00:52 +0200 (MEST) Received: from [192.168.199.30] (wlan.informatik.hu-berlin.de [141.20.21.26]) (authenticated bits=0) by mailbox.informatik.hu-berlin.de (8.14.7/8.14.7/INF-2.0-MA-SOLARIS-2.10-AUTH-26-465-587) with ESMTP id t72N0nkC029627 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO) for ; Mon, 3 Aug 2015 01:00:50 +0200 (MEST) Message-ID: <55BEA133.1090402@informatik.hu-berlin.de> Date: Mon, 03 Aug 2015 01:01:07 +0200 From: "Matthias J. Sax" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.7.0 MIME-Version: 1.0 To: dev@flink.apache.org Subject: Re: Tuple References: <55BBCE60.2060305@informatik.hu-berlin.de> <55BBDD2B.9060703@fu-berlin.de> <55BBDE43.2030608@fu-berlin.de> <55BCA7CE.7000603@informatik.hu-berlin.de> <55BCAFC5.3080102@informatik.hu-berlin.de> <55BE6E65.3000903@informatik.hu-berlin.de> <55BE980B.9000003@fu-berlin.de> <55BE9D6D.5040709@informatik.hu-berlin.de> In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="HCD41tjO70kurBIQaC7EIsmMIEWJQkW6b" X-Virus-Scanned: clamav-milter 0.98.4 at mailbox X-Virus-Status: Clean X-Greylist: Sender succeeded STARTTLS authentication, not delayed by milter-greylist-4.5.1 (mail.informatik.hu-berlin.de [141.20.20.50]); Mon, 03 Aug 2015 01:00:52 +0200 (MEST) --HCD41tjO70kurBIQaC7EIsmMIEWJQkW6b Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Thanks for the advice about Tuple0. I personally don't see any advantage in having "flink-tuple" project. Do I miss anything about it? Furthermore, I am not sure if it is a good idea the have too many too small projects. On 08/03/2015 12:48 AM, Stephan Ewen wrote: > Tuple0 would need special serialization and comparator logic. If that i= s > given, I see no reason not to support it. >=20 > There is BTW, the request to create a dedicated "flink-tuple" project, = that > only contains the tuple classes. Any opinions on that? >=20 > On Mon, Aug 3, 2015 at 12:45 AM, Matthias J. Sax < > mjsax@informatik.hu-berlin.de> wrote: >=20 >> Thanks for the explanation! >> >> As I mentioned before, Tuple0 might also be helpful for streaming. And= I >> guess I will need it for Storm compatibility layer, too. (I need to >> double check, but Storm supports zero-attribute-tuples, too). >> >> With regard to the information I collected during the discussion, I vo= te >> for keeping Tuple0 in Flink core, and fix the serialization problem. >> Should we have another JIRA for this? Or should I extend the existing >> JIRA? (https://issues.apache.org/jira/browse/FLINK-2457) >> >> -Matthias >> >> >> On 08/03/2015 12:22 AM, Chesnay Schepler wrote: >>> First of all, it was a really good idea to start a discussion about t= his. >>> >>> So the general idea behind Tuple0 was this: >>> >>> The Python API maps python tuples to flink tuples. Python can have em= pty >>> tuples, so i thought "well duh, let's make a Tuple0 class!". What i d= id >>> not wanna do is create some non-Tuple object to represent empty tuple= s, >>> I'd rather have them treated the same, because it's less work and >>> creates simpler code. >>> >>> When transferring the plan to java, certain parameters for operations= >>> are tuples, which can be empty aswell. >>> This is where the Tuple0 class is really useful, because these empty >>> tuples go through the same logic as other tuples. >>> This is also why i want to keep the class, at least in the python >>> project, for now. >>> >>> For the actual program execution, I need a new solution. Funny story,= >>> while writing this reply i noticed that the Python API can't handle >>> Tuple0 at runtime aswell. ha...ha... -.- >>> >>> Guess I now know what I'm working on next. >>> >>> On 02.08.2015 21:24, Matthias J. Sax wrote: >>>> Can you elaborate how and why Python used Tuple0? If it cannot be >>>> serialized similar to regular Tuples, what is the usage in Python? R= ight >>>> now it seems, as there is no special serialization code for Tuple0. >>>> >>>> I just want to understand the topic in detail. >>>> >>>> -Matthias >>>> >>>> >>>> On 08/01/2015 03:38 PM, Stephan Ewen wrote: >>>>> I think a Tuple0 cannot be implemented like the current tuples, at >> least >>>>> with respect to runtime serialization. >>>>> >>>>> The system makes the assumption that it makes progress in consuming= >>>>> bytes >>>>> when deserializing values. If a Tuple=3D never consumes data from t= he >> byte >>>>> stream, this assumption is broken. It would need at least one marke= r >>>>> byte. >>>>> Then it effectively is a Tuple1 disgusing itself as a tuple0.= >>>>> >>>>> >>>>> >>>>> On Sat, Aug 1, 2015 at 1:38 PM, Matthias J. Sax < >>>>> mjsax@informatik.hu-berlin.de> wrote: >>>>> >>>>>> I just double checked. Scala does not have type Tuple0. IMHO, it w= ould >>>>>> be best to remove Tuple0 for consistency. Having Tuple types is fo= r >>>>>> consistency reason with Scala in the first place, right? Please gi= ve >>>>>> feedback. >>>>>> >>>>>> -Matthias >>>>>> >>>>>> >>>>>> On 08/01/2015 01:04 PM, Matthias J. Sax wrote: >>>>>>> I see. >>>>>>> >>>>>>> I think that it might be useful to have Tuple0, because in rare >> cases, >>>>>>> you only want to "notify" a downstream operators (taking about >>>>>>> streaming) that something happened but there is no actual data to= be >>>>>>> processed. Furthermore, if Flink cannot deal with Tuple0 it shoul= d be >>>>>>> removed completely for consistency IMHO. >>>>>>> >>>>>>> I will open a JIRA for it. >>>>>>> >>>>>>> -Matthias >>>>>>> >>>>>>> On 07/31/2015 10:44 PM, Chesnay Schepler wrote: >>>>>>>> also, I'm not sure if I ever sent a Tuple0 through a program, it= >>>>>>>> could >>>>>>>> be that the system freaks out. >>>>>>>> >>>>>>>> On 31.07.2015 22:40, Chesnay Schepler wrote: >>>>>>>>> there's no specific reason. it was added fairly recently by me >>>>>>>>> (mid of >>>>>>>>> april), and you're most likely the second person to use it. >>>>>>>>> >>>>>>>>> i didn't integrate into all our tuple related stuff because, we= ll, >> i >>>>>>>>> never thought anyone would actually need it, so i saved myself = the >>>>>>>>> trouble. >>>>>>>>> >>>>>>>>>> Hi, >>>>>>>>>> >>>>>>>>>> is there any specific reason, why Tuple.getTupleClass(int arit= y) >>>>>>>>>> does >>>>>>>>>> not support arity zero? There is a class Tuple0, but it cannot= be >>>>>>>>>> generator by Tuple.getTupleClass(...). Is it a missing feature= (I >>>>>> would >>>>>>>>>> like to have it). >>>>>>>>>> >>>>>>>>>> -Matthias >>>>>>>>>> >>>>>>>>> >>>>>> >>> >> >> >=20 --HCD41tjO70kurBIQaC7EIsmMIEWJQkW6b Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJVvqEzAAoJEBXkotPFErDWjz8P/RA6eIx2JevUInFQn5TMfY2b WqWZyiz3bzesaMRhGmwM5idxFl75sDoCA/vndXC00DU3yyeLCbOPUeYfehf84/SU BmYDwYE44JUAvXSQm9HKIES4PW1HuCSB9MzKMCzMBJ7ApB16DdYFJPnqdXPY/ztx WxSNGq/eFczG5IEzXD112Gd0hRfhSd28OsT1jOCqQtiZg1tPxCttKtdFgWpiAD+U 7CpjOMx7vP9UT2clmb+iUm+Kd8DysZvmowCF1qN1w2W0m0vKmwO5sTiDGDuLfo3b Gb4o9OsYrGROOHzCf9zo4+satXXS7tpjYIPv0CDcDBa3bYDxOekR9dVKz/Oovpm0 4U/PMBIQJLVbXRc68ES7QaeVUa2Pzp1++zVxH9eofinKkeYIc76xcWjzddUyzDbg mhH7an02r/lIzqwgtIFLMRRaI3CRv+skvyBXYt5WAPh+GEdAGw3ym1JMG4iKUhO9 jiCcHzmmTOIf2jfJh0RlSKB2ZcPI2vEKPI9V9WhL1Z/KnIaPqMDNLr7MVBj1EhYE zZJ7E4PMJvBf8IogeadqW4n/NKgwJTYkiXwu6911O55YGTGNlKO8YOpccoELVFeo +RvoTrKSJwWVE15KdPMkZkMnJE7CBYbS0la8SoIR9mqDI4wHpRipPnP4/SuVF7EJ zvf41C99D6RmXHuS50rV =XSJ5 -----END PGP SIGNATURE----- --HCD41tjO70kurBIQaC7EIsmMIEWJQkW6b--