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 EF21F18575 for ; Wed, 2 Mar 2016 14:59:46 +0000 (UTC) Received: (qmail 7759 invoked by uid 500); 2 Mar 2016 14:59:46 -0000 Delivered-To: apmail-flink-dev-archive@flink.apache.org Received: (qmail 7699 invoked by uid 500); 2 Mar 2016 14:59:46 -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 7685 invoked by uid 99); 2 Mar 2016 14:59:46 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Mar 2016 14:59:46 +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 116D21804D6 for ; Wed, 2 Mar 2016 14:59:46 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.179 X-Spam-Level: * X-Spam-Status: No, score=1.179 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx2-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id h1vzFazJ93Vd for ; Wed, 2 Mar 2016 14:59:43 +0000 (UTC) Received: from mail-wm0-f41.google.com (mail-wm0-f41.google.com [74.125.82.41]) by mx2-lw-eu.apache.org (ASF Mail Server at mx2-lw-eu.apache.org) with ESMTPS id 2CBF65FE5C for ; Wed, 2 Mar 2016 14:59:43 +0000 (UTC) Received: by mail-wm0-f41.google.com with SMTP id p65so81431542wmp.0 for ; Wed, 02 Mar 2016 06:59:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=krXe0ez+/N3HWYxw6DHrDEQPFAajkVxkDzoApcR3h0U=; b=ky5DJiv6lX5j6Ba6Y1cf5f5CgcHdczUnrwBnJp2fZdlv+IynBPv5taU2fdJU29JEsk hwVt+1vJWmFqtxx4fQEoqc3Q6V3ZseGFgG2K1/QoRKhl0IKC9HOuxLdeaYhXkFnORINP s1q81081/ftI6nLf4PpNqXZZ+LyOixqOJoIf3FfnqgTJqlLHoLVKifeuAuaaS9mJcoxx KNJgmP4m9q1BiuvCAZNZWQZdtCVtxW1g6JNsF5UZXRcQ0w+UUM5BdMaNzYKWNOst2r+O Bjb14BRCRkq8bWKc9ktDT66dvLHGgaQBtptkltOaBxG7yonFP2wx1oY8bmdhHMYNSebX p6jg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=krXe0ez+/N3HWYxw6DHrDEQPFAajkVxkDzoApcR3h0U=; b=EHY26Jdhdh3inXYR4CFdEkeT8Ax9gUsgQUpPSrFqzdovD9XlIyLBYVZ7QFBD/0QOCh Dx20CKntjCJW7mzctLHfYYK4LJsGt6EBKgz+LK8F1kw7VX3il8FiynLPAE+HxCAfaH2/ mO6ZTulkiRcFzDdx9jFbqZdZiUGpbdX/JyM9Jhux2izi7GHaGLWlf2Q1TpHs+SMhxz2b 7al/B24Ph6DZh5uL+lr6Yt7fCmtTSjVV5zb8KUpMEb5fuoagAkvjSfXVcE8IW/ju4Nlt WyTUKZrhIqJcXfc4lP6iE45vKuA6sPBKtZK79PSg6ygm/G0bJM5L1zAhDePTZjK+44XK cAJA== X-Gm-Message-State: AD7BkJKeoj73X7Xro7JInwFnWj3h/eHLIMYVoCjMQ0ONAoBYrzmLXUkZ59NfXpWow9TNtAcME3HX77OpvbOnQA== X-Received: by 10.28.64.198 with SMTP id n189mr280387wma.85.1456930461957; Wed, 02 Mar 2016 06:54:21 -0800 (PST) MIME-Version: 1.0 References: <56D6E464.6090104@apache.org> <56D6F70F.8060408@apache.org> <56D6FBE2.8090605@apache.org> In-Reply-To: <56D6FBE2.8090605@apache.org> From: =?UTF-8?Q?Gyula_F=C3=B3ra?= Date: Wed, 02 Mar 2016 14:54:12 +0000 Message-ID: Subject: Re: Input type validation is killing me To: dev@flink.apache.org Content-Type: multipart/alternative; boundary=94eb2c05aff6a5c668052d120ede --94eb2c05aff6a5c668052d120ede Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Okay, I will open a JIRA issue Gyula Timo Walther ezt =C3=ADrta (id=C5=91pont: 2016. m=C3= =A1rc. 2., Sze, 15:42): > Can you open an issue with an example of your custom TypeInfo? I will > then open a suitable PR for it. > > > On 02.03.2016 15:33, Gyula F=C3=B3ra wrote: > > Would that work with generic classes? > > > > Timo Walther ezt =C3=ADrta (id=C5=91pont: 2016. m= =C3=A1rc. 2., > Sze, > > 15:22): > > > >> After thinking about it, I think an even better solution is to provide > >> an interface for the TypeExtractor where the user can register mapping= s > >> from class to TypeInformation. > >> So that the TypeExctractor is more extensible. This would also solve y= ou > >> problem. What do you think? > >> > >> On 02.03.2016 15:00, Gyula F=C3=B3ra wrote: > >>> Hi! > >>> > >>> Yes I think, that sounds good :) We just need to make sure that this > >> works > >>> with things like the TupleTypeInfo which is built-on but I can still > mix > >> in > >>> new Types for the fields. > >>> > >>> Thanks, > >>> Gyula > >>> > >>> Timo Walther ezt =C3=ADrta (id=C5=91pont: 2016. = m=C3=A1rc. 2., > >> Sze, > >>> 14:02): > >>> > >>>> The TypeExtractor's input type validation was designed for the > built-in > >>>> TypeInformation classes. > >>>> > >>>> In your case of a new, unknown TypeInformation, the validation shoul= d > >>>> simply skipped, because we can assume that you user knows what he is > >> doing. > >>>> I can open a PR for that. > >>>> > >>>> > >>>> On 02.03.2016 11:34, Aljoscha Krettek wrote: > >>>>> I think you have a point. Another user also just ran into problems > with > >>>> the TypeExtractor. (The =E2=80=9CJava Maps and TypeInformation=E2=80= =9D email). > >>>>> So let=E2=80=99s figure out what needs to be changed to make it wor= k for all > >>>> people. > >>>>> Cheers, > >>>>> Aljoscha > >>>>>> On 02 Mar 2016, at 11:15, Gyula F=C3=B3ra wrot= e: > >>>>>> > >>>>>> Hey, > >>>>>> > >>>>>> I have brought up this issue a couple months back but I would like > to > >>>> do it > >>>>>> again. > >>>>>> > >>>>>> I think the current way of validating the input type of udfs again= st > >> the > >>>>>> out type of the preceeding operators is too aggressive and breaks = a > >> lot > >>>> of > >>>>>> code that should otherwise work. > >>>>>> > >>>>>> This issue appears all the time when I want to use my own > >>>>>> TypeInformations<> for operators such as creating my own Tuple > >> typeinfos > >>>>>> with custom types for the different fields and so. > >>>>>> > >>>>>> I have a more complex streaming job which would not run if I have > the > >>>> input > >>>>>> type validation. Replacing the Exceptions with logging my Job runs > >>>>>> perfectly (making my point) but you can see the errors that would > have > >>>> been > >>>>>> reported as exceptions in the logs: > >>>>>> > >>>>>> 2016-03-02 11:06:03,447 ERROR > >>>>>> org.apache.flink.api.java.typeutils.TypeExtractor - Input mismatch= : > >>>> Generic > >>>>>> object type =E2=80=98mypackage.TestEvent' expected but was > =E2=80=98mypackage.Event=E2=80=99. > >>>>>> 2016-03-02 11:06:03,450 ERROR > >>>>>> org.apache.flink.api.java.typeutils.TypeExtractor - Input mismatch= : > >>>> Unknown > >>>>>> Error. Type is null. > >>>>>> 2016-03-02 11:06:03,466 ERROR > >>>>>> org.apache.flink.api.java.typeutils.TypeExtractor - Input mismatch= : > >>>> Basic > >>>>>> type expected. > >>>>>> 2016-03-02 11:06:03,470 ERROR > >>>>>> org.apache.flink.api.java.typeutils.TypeExtractor - Input mismatch= : > >>>> Basic > >>>>>> type expected. > >>>>>> > >>>>>> Clearly all these errors where not valid in my case as my job runs > >>>>>> perfectly. > >>>>>> > >>>>>> Would it make sense to change the current behaviour or am I just > >> abusing > >>>>>> the .returns(..) and ResultTypeQueryable interfaces in unintended > >> ways. > >>>>>> Cheers, > >>>>>> Gyula > >> > > --94eb2c05aff6a5c668052d120ede--