Return-Path: X-Original-To: apmail-flink-user-archive@minotaur.apache.org Delivered-To: apmail-flink-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C3DF218F8B for ; Fri, 26 Feb 2016 09:34:33 +0000 (UTC) Received: (qmail 65839 invoked by uid 500); 26 Feb 2016 09:34:27 -0000 Delivered-To: apmail-flink-user-archive@flink.apache.org Received: (qmail 65751 invoked by uid 500); 26 Feb 2016 09:34:27 -0000 Mailing-List: contact user-help@flink.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@flink.apache.org Delivered-To: mailing list user@flink.apache.org Received: (qmail 65741 invoked by uid 99); 26 Feb 2016 09:34:27 -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; Fri, 26 Feb 2016 09:34:27 +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 37F381A088F for ; Fri, 26 Feb 2016 09:34:27 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-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: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.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 arXU2ORD8JtS for ; Fri, 26 Feb 2016 09:34:25 +0000 (UTC) Received: from mail-ig0-f174.google.com (mail-ig0-f174.google.com [209.85.213.174]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id DC9D35FAED for ; Fri, 26 Feb 2016 09:34:24 +0000 (UTC) Received: by mail-ig0-f174.google.com with SMTP id xg9so31174600igb.1 for ; Fri, 26 Feb 2016 01:34:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to; bh=YlwvjK2/fsJMLYXQ4kTvS8vSjqPwSq5k41MQbgpdBL8=; b=tKEmV145wnYBD7FShOot+nkJTpFyqhasKh12jegc65KxHSQFou4Lr2sOxAsI6a6b0w jFVZDJvSZQovdP4JAVQbJUg5noMXEs5Jew+75NZ5j/VuW8TfCxEYLmQEZ8MMhVw0OuaJ Ubn9YL1z8Uxs+mxVrcsVL3CBIxKcuIKapCVvn+9O8aLNXBwT6p5ZBkY064idTQZwm0zN hkJwTKEw8AbEn88ZwfC20+LEShszEz3T5zMrvP1FyLewq+6dLMk09MzvaT7wdl5zWHvG CwDiCLt0LiZEbl7KYbTfDC/UU7+HQTWmEWPQnt4XJnI9ROxTcZ/ND8WoM/3XlviV1aSU G00A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to; bh=YlwvjK2/fsJMLYXQ4kTvS8vSjqPwSq5k41MQbgpdBL8=; b=bClwyMdEK0VKPAYSYkEFu8sol9sBr/FngT32+BjQnI31VnLSc/A0fq1LSiF2nzUzXI gej4bmyCgc4kqpnY/4xLsvCzGReHIZOy7RbxD1hwMN2VMLLR19ey/5t6ohkPdnNn0/E8 ZHwKy3/Cj6phAkQu6XSG1Bb3sDbFzFrNBrjFZqVaBSi2Zgt5LmWQqZaAVketN3pdOgFd sPsmpCFyG/ahE0eUIeiRqFm6kzxgTkN3bRwlbjqoS3k/OC01UCrg6z1Vi7Jxww5DCx3R AA99iqCDR8XnQev4dp/EqYQDKiRHlC6k6im9RSmqpGu1CQ/mcAG3w+RPe6u/oJQH18Cs uy1A== X-Gm-Message-State: AD7BkJIFbkk2vcL4Sv1dCxiSUu2UWwKhc1k9VwEe5p+zqH8oY5oEneFuefNf30ohL4gTQa7o6xRWioJXJNA8zw== MIME-Version: 1.0 X-Received: by 10.50.73.197 with SMTP id n5mr1881660igv.66.1456479263827; Fri, 26 Feb 2016 01:34:23 -0800 (PST) Received: by 10.79.115.200 with HTTP; Fri, 26 Feb 2016 01:34:23 -0800 (PST) Date: Fri, 26 Feb 2016 15:04:23 +0530 Message-ID: Subject: Need some help to understand the cause of the error From: Nirmalya Sengupta To: user@flink.apache.org Content-Type: multipart/alternative; boundary=089e0116181224aefc052ca90150 --089e0116181224aefc052ca90150 Content-Type: text/plain; charset=UTF-8 Hello Aljoscha, I have also tried by using the field's name in the sum("field3") function (like you have suggested), but this time the exception is different: -------------------------------------------------------------------- Exception in thread "main" java.lang.ExceptionInInitializerError at org.apache.flink.quickstart.StreamWindowExperiments.MultiWindowing.main(MultiWindowing.scala) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:140) Caused by: java.lang.IllegalArgumentException: Key expressions are only supported on POJO types and Tuples. A type is considered a POJO if all its fields are public, or have both getters and setters defined at org.apache.flink.streaming.util.FieldAccessor$PojoFieldAccessor.(FieldAccessor.java:175) at org.apache.flink.streaming.util.FieldAccessor.create(FieldAccessor.java:92) at org.apache.flink.streaming.api.functions.aggregation.SumAggregator.(SumAggregator.java:49) at org.apache.flink.streaming.api.datastream.WindowedStream.sum(WindowedStream.java:390) at org.apache.flink.quickstart.StreamWindowExperiments.MultiWindowing$.(MultiWindowing.scala:63) at org.apache.flink.quickstart.StreamWindowExperiments.MultiWindowing$.(MultiWindowing.scala) ... 6 more --------------------------------------------------------------------- I have used both of the styles of calling sum() in earlier, but I never got this exception. That's why I am a little confused. 'Reading' is a _case class_ and hence, a POJO as I understand. Yet, the message seems to say that it is not. -- Nirmalya -- Software Technologist http://www.linkedin.com/in/nirmalyasengupta "If you have built castles in the air, your work need not be lost. That is where they should be. Now put the foundation under them." --089e0116181224aefc052ca90150 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hello Aljoscha,

I have also tried by us= ing the field's name in the sum("field3") function (like you = have suggested), but this time the exception is different:

------------------------------------------------------= --------------

Exception in thread "main" java.lang.ExceptionInInitializer= Error
at org.apache.flink.quickstart.StreamWin= dowExperiments.MultiWindowing.main(MultiWindowing.scala)
<= font face=3D"monospace, monospace"> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke= (NativeMethodAccessorImpl.java:62)
at sun.refl= ect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:4= 3)
at java.lang.reflect.Method.invoke(Method.j= ava:497)
at com.intellij.rt.execution.applic= ation.AppMain.main(AppMain.java:140)
Caused by: java.lang.IllegalArgumentException: Key expressio= ns are only supported on POJO types and Tuples. A type is considered a POJO= if all its fields are public, or have both getters and setters defined
at org.apache.flink.streaming.util.FieldAccessor$= PojoFieldAccessor.<init>(FieldAccessor.java:175)
at org.apache.flink.streaming.util.FieldAccessor.create(FieldAcces= sor.java:92)
at org.apache.flink.streaming.api= .functions.aggregation.SumAggregator.<init>(SumAggregator.java:49)
at org.apache.flink.streaming.api.datastream.W= indowedStream.sum(WindowedStream.java:390)
at = org.apache.flink.quickstart.StreamWindowExperiments.MultiWindowing$.<ini= t>(MultiWindowing.scala:63)
at org.apache.f= link.quickstart.StreamWindowExperiments.MultiWindowing$.<clinit>(Mult= iWindowing.scala)
... 6 more

------------------------------------------------------= ---------------

I have used both of the styles of = calling sum() in earlier, but I never got this exception. That's why I = am a little confused. 'Reading' is a _case class_ and hence, a POJO= as I understand. Yet, the message seems to say that it is not.
<= br>
-- =C2=A0Nirmalya

--
Software Technologist
http://www.linkedin.com/in/nirmalyas= engupta
"If you have built castles in the air, your work need n= ot be lost. That is where they should be.
Now put the foundation under t= hem."
--089e0116181224aefc052ca90150--