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 <aljos...@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 <u...@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
>> <pomperma...@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
>>
>

Reply via email to