You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@flink.apache.org by Flavio Pompermaier <po...@okkam.it> on 2016/05/19 15:49:19 UTC

TypeExtractor:1672 - class org.joda.time.DateTime is not a valid POJO type

Hi to all,

I'm using Flink 1.0.2 and testing the job I discovered that I have a lot of
log with this error:

*TypeExtractor:1672 - class org.joda.time.DateTime is not a valid POJO type*

initially I though I forgot to properly migrate my code from 0.10.x to
1.0.x as stated in [1] but the I checked my code and i correctly build the
ExecutionEnvironment as:


*env =
ExecutionEnvironment.createLocalEnvironment(c);env.registerTypeWithKryoSerializer(DateTime.class,
JodaDateTimeSerializer.class );*

So, is this log to ignore or I have a problem? Should it be put to debug or
not printed at all?

[1]
https://cwiki.apache.org/confluence/display/FLINK/Migration+Guide%3A+0.10.x+to+1.0.x

Best,
Flavio

Re: TypeExtractor:1672 - class org.joda.time.DateTime is not a valid POJO type

Posted by Flavio Pompermaier <po...@okkam.it>.
Indeed you can test this problem with:

import org.apache.flink.api.java.ExecutionEnvironment;
import org.joda.time.DateTime;

import de.javakaffee.kryoserializers.jodatime.JodaDateTimeSerializer;

public class DateTimeError {

    public static void main(String[] args) throws Exception {
        ExecutionEnvironment env =
ExecutionEnvironment.getExecutionEnvironment();
        env.registerTypeWithKryoSerializer(DateTime.class,
JodaDateTimeSerializer.class );
        env.fromElements(DateTime.now(), DateTime.now()).print();
    }
}


The very first line of the output is:

2016-05-20 15:39:02 INFO  TypeExtractor:1672 - class org.joda.time.DateTime
is not a valid POJO type

So the program actually runs successfully but there's this annoying LOG
statement :(

On Fri, May 20, 2016 at 3:27 PM, Aljoscha Krettek <al...@apache.org>
wrote:

> I think it might just be a warning. When using Kryo it is in the end a
> GenericTypeInformation but the TypeAnalyzer might still initially try to
> analyze it as a POJO.
>
> On Fri, 20 May 2016 at 12:51 Ufuk Celebi <uc...@apache.org> wrote:
>
>> I tried to reproduce this and if you set up the depdency
>>
>> <dependency>
>>        <groupId>de.javakaffee</groupId>
>>        <artifactId>kryo-serializers</artifactId>
>>        <version>0.28</version>
>>    </dependency>
>>
>> and register the Kryo type as suggested you should not see any log
>> messages (e.g. the type should be treated as a generic type and not a
>> pojo type).
>>
>> Does the program successfully execute for you?
>>
>> – Ufuk
>>
>>
>> On Thu, May 19, 2016 at 5:49 PM, Flavio Pompermaier
>> <po...@okkam.it> wrote:
>> > Hi to all,
>> >
>> > I'm using Flink 1.0.2 and testing the job I discovered that I have a
>> lot of
>> > log with this error:
>> >
>> > TypeExtractor:1672 - class org.joda.time.DateTime is not a valid POJO
>> type
>> >
>> > initially I though I forgot to properly migrate my code from 0.10.x to
>> 1.0.x
>> > as stated in [1] but the I checked my code and i correctly build the
>> > ExecutionEnvironment as:
>> >
>> > env = ExecutionEnvironment.createLocalEnvironment(c);
>> > env.registerTypeWithKryoSerializer(DateTime.class,
>> > JodaDateTimeSerializer.class );
>> >
>> > So, is this log to ignore or I have a problem? Should it be put to
>> debug or
>> > not printed at all?
>> >
>> > [1]
>> >
>> https://cwiki.apache.org/confluence/display/FLINK/Migration+Guide%3A+0.10.x+to+1.0.x
>> >
>> > Best,
>> > Flavio
>>
>

Re: TypeExtractor:1672 - class org.joda.time.DateTime is not a valid POJO type

Posted by Flavio Pompermaier <po...@okkam.it>.
Ok..great to hear that!

Thanks to all for the support

On Fri, May 20, 2016 at 3:53 PM, Ufuk Celebi <uc...@apache.org> wrote:

> On Fri, May 20, 2016 at 3:27 PM, Aljoscha Krettek <al...@apache.org>
> wrote:
> > I think it might just be a warning. When using Kryo it is in the end a
> > GenericTypeInformation but the TypeAnalyzer might still initially try to
> > analyze it as a POJO.
>
> Yes, that's correct.
>
> To get back at the initial question: it's safe to ignore it then. ;)
>

Re: TypeExtractor:1672 - class org.joda.time.DateTime is not a valid POJO type

Posted by Ufuk Celebi <uc...@apache.org>.
On Fri, May 20, 2016 at 3:27 PM, Aljoscha Krettek <al...@apache.org> wrote:
> I think it might just be a warning. When using Kryo it is in the end a
> GenericTypeInformation but the TypeAnalyzer might still initially try to
> analyze it as a POJO.

Yes, that's correct.

To get back at the initial question: it's safe to ignore it then. ;)

Re: TypeExtractor:1672 - class org.joda.time.DateTime is not a valid POJO type

Posted by Aljoscha Krettek <al...@apache.org>.
I think it might just be a warning. When using Kryo it is in the end a
GenericTypeInformation but the TypeAnalyzer might still initially try to
analyze it as a POJO.

On Fri, 20 May 2016 at 12:51 Ufuk Celebi <uc...@apache.org> wrote:

> I tried to reproduce this and if you set up the depdency
>
> <dependency>
>        <groupId>de.javakaffee</groupId>
>        <artifactId>kryo-serializers</artifactId>
>        <version>0.28</version>
>    </dependency>
>
> and register the Kryo type as suggested you should not see any log
> messages (e.g. the type should be treated as a generic type and not a
> pojo type).
>
> Does the program successfully execute for you?
>
> – Ufuk
>
>
> On Thu, May 19, 2016 at 5:49 PM, Flavio Pompermaier
> <po...@okkam.it> wrote:
> > Hi to all,
> >
> > I'm using Flink 1.0.2 and testing the job I discovered that I have a lot
> of
> > log with this error:
> >
> > TypeExtractor:1672 - class org.joda.time.DateTime is not a valid POJO
> type
> >
> > initially I though I forgot to properly migrate my code from 0.10.x to
> 1.0.x
> > as stated in [1] but the I checked my code and i correctly build the
> > ExecutionEnvironment as:
> >
> > env = ExecutionEnvironment.createLocalEnvironment(c);
> > env.registerTypeWithKryoSerializer(DateTime.class,
> > JodaDateTimeSerializer.class );
> >
> > So, is this log to ignore or I have a problem? Should it be put to debug
> or
> > not printed at all?
> >
> > [1]
> >
> https://cwiki.apache.org/confluence/display/FLINK/Migration+Guide%3A+0.10.x+to+1.0.x
> >
> > Best,
> > Flavio
>

Re: TypeExtractor:1672 - class org.joda.time.DateTime is not a valid POJO type

Posted by Ufuk Celebi <uc...@apache.org>.
I tried to reproduce this and if you set up the depdency

<dependency>
       <groupId>de.javakaffee</groupId>
       <artifactId>kryo-serializers</artifactId>
       <version>0.28</version>
   </dependency>

and register the Kryo type as suggested you should not see any log
messages (e.g. the type should be treated as a generic type and not a
pojo type).

Does the program successfully execute for you?

– Ufuk


On Thu, May 19, 2016 at 5:49 PM, Flavio Pompermaier
<po...@okkam.it> wrote:
> Hi to all,
>
> I'm using Flink 1.0.2 and testing the job I discovered that I have a lot of
> log with this error:
>
> TypeExtractor:1672 - class org.joda.time.DateTime is not a valid POJO type
>
> initially I though I forgot to properly migrate my code from 0.10.x to 1.0.x
> as stated in [1] but the I checked my code and i correctly build the
> ExecutionEnvironment as:
>
> env = ExecutionEnvironment.createLocalEnvironment(c);
> env.registerTypeWithKryoSerializer(DateTime.class,
> JodaDateTimeSerializer.class );
>
> So, is this log to ignore or I have a problem? Should it be put to debug or
> not printed at all?
>
> [1]
> https://cwiki.apache.org/confluence/display/FLINK/Migration+Guide%3A+0.10.x+to+1.0.x
>
> Best,
> Flavio