flink-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aljoscha Krettek <aljos...@apache.org>
Subject Re: [Exception]Key expressions are only supported on POJO types and Tuples
Date Wed, 11 Feb 2015 10:09:30 GMT
>From the Flink documentation:

Conditions for a class to be treated as a POJO by Flink:

 - The class must be public
 - It must have a public constructor without arguments
 - All fields either have to be public or there must be getters and
setters for all non-public fields.

In your example, the zero argument constructor is missing. You could
consider adding the constructor or changing to case classes.

On Wed, Feb 11, 2015 at 10:08 AM, Fabian Hueske <fhueske@gmail.com> wrote:
> In case you want to contribute or follow the discussion, here's the JIRA:
> https://issues.apache.org/jira/browse/FLINK-1511
>
> Again, thanks for reporting!
>
> 2015-02-11 9:59 GMT+01:00 Fabian Hueske <fhueske@gmail.com>:
>>
>> Hi,
>>
>> you are right, there is a problem. I reproduced the problem and it seems
>> that regular Scala classes are not properly analyzed and not identified as
>> Pojos.
>> As long as you only need these classes to be data holders without custom
>> logic, you could go with case classes.
>>
>> I will open a JIRA to extend Pojo support for regular Scala classes.
>>
>> Thanks for reporting,
>> Fabian
>>
>> 2015-02-11 2:42 GMT+01:00 Vinh June <hoangthevinh.htv@gmail.com>:
>>>
>>> sorry, here is also the Metadata class that I use
>>> http://pastebin.com/WUQE613E
>>>
>>>
>>>
>>> --
>>> View this message in context:
>>> http://apache-flink-incubator-user-mailing-list-archive.2336050.n4.nabble.com/Exception-Key-expressions-are-only-supported-on-POJO-types-and-Tuples-tp720p721.html
>>> Sent from the Apache Flink (Incubator) User Mailing List archive. mailing
>>> list archive at Nabble.com.
>>
>>
>

Mime
View raw message