Re: NPE when using Joda DateTime

2016-01-15 Thread Romain Sagean
Hi, I had a similar problem with Joda Time though i didn't use Kryo, the solution I found was to use standard java date and time classes instead of Joda. 2016-01-15 13:16 GMT+01:00 Sean Owen : > I haven't dug into this, but I agree that something that is transient > isn't

Re: NPE when using Joda DateTime

2016-01-15 Thread Sean Owen
I haven't dug into this, but I agree that something that is transient isn't meant to be restored by the default Java serialization mechanism. I'd expect the class handles restoring that value as needed or in a custom readObject method. And then I don't know how Kryo interacts with that. I don't

RE: NPE when using Joda DateTime

2016-01-15 Thread Spencer, Alex (Santander)
(Santander) Cc: Shixiong(Ryan) Zhu; user@spark.apache.org Subject: Re: NPE when using Joda DateTime I haven't dug into this, but I agree that something that is transient isn't meant to be restored by the default Java serialization mechanism. I'd expect the class handles restoring that value as needed

RE: NPE when using Joda DateTime

2016-01-15 Thread Spencer, Alex (Santander)
) then: tempDate.minusHours(1) works fine. Kind Regards, Alex. From: Romain Sagean [mailto:romain.sag...@hupi.fr] Sent: 15 January 2016 13:08 To: Sean Owen Cc: Spencer, Alex (Santander); Shixiong(Ryan) Zhu; user@spark.apache.org Subject: Re: NPE when using Joda DateTime Hi, I had a similar problem with Joda Time

RE: NPE when using Joda DateTime

2016-01-15 Thread Spencer, Alex (Santander)
...@databricks.com] Sent: 14 January 2016 21:57 To: Durgesh Verma Cc: Spencer, Alex (Santander); Todd Nist; Sean Owen; user@spark.apache.org Subject: Re: NPE when using Joda DateTime Could you try to use "Kryo.setDefaultSerializer" like this: class YourKryoRegistrator extends KryoRegistrator { ov

NPE when using Joda DateTime

2016-01-14 Thread Spencer, Alex (Santander)
Hello, I was wondering if somebody is able to help me get to the bottom of a null pointer exception I'm seeing in my code. I've managed to narrow down a problem in a larger class to my use of Joda's DateTime functions. I've successfully run my code in scala, but I've hit a few problems when

RE: NPE when using Joda DateTime

2016-01-14 Thread Spencer, Alex (Santander)
Sean Owen [mailto:so...@cloudera.com] Sent: 14 January 2016 14:07 To: Spencer, Alex (Santander) Cc: user@spark.apache.org Subject: Re: NPE when using Joda DateTime It does look somehow like the state of the DateTime object isn't being recreated properly on deserialization somehow, given where the NPE oc

Re: NPE when using Joda DateTime

2016-01-14 Thread Sean Owen
It does look somehow like the state of the DateTime object isn't being recreated properly on deserialization somehow, given where the NPE occurs (look at the Joda source code). However the object is java.io.Serializable. Are you sure the Kryo serialization is correct? It doesn't quite explain why

Re: NPE when using Joda DateTime

2016-01-14 Thread Sean Owen
> From: Sean Owen [mailto:so...@cloudera.com] > Sent: 14 January 2016 14:07 > To: Spencer, Alex (Santander) > Cc: user@spark.apache.org > Subject: Re: NPE when using Joda DateTime > > It does look somehow like the state of the DateTime object isn't being > recreated proper

RE: NPE when using Joda DateTime

2016-01-14 Thread Spencer, Alex (Santander)
tried that yet. Kind Regards, Alex. From: Todd Nist [mailto:tsind...@gmail.com] Sent: 14 January 2016 16:28 To: Spencer, Alex (Santander) Cc: Sean Owen; user@spark.apache.org Subject: Re: NPE when using Joda DateTime I had a similar problem a while back and leveraged these Kryo serializers, https

Re: NPE when using Joda DateTime

2016-01-14 Thread Durgesh Verma
he INTERVAL part below may be key, I haven’t tried that yet. > > Kind Regards, > Alex. > > From: Todd Nist [mailto:tsind...@gmail.com] > Sent: 14 January 2016 16:28 > To: Spencer, Alex (Santander) > Cc: Sean Owen; user@spark.apache.org > Subject: Re: NPE when us

Re: NPE when using Joda DateTime

2016-01-14 Thread Todd Nist
> Array[DateTime]? I don’t want to find the answer by trial and error though. > > Alex > > -Original Message- > From: Sean Owen [mailto:so...@cloudera.com] > Sent: 14 January 2016 14:07 > To: Spencer, Alex (Santander) > Cc: user@spark.apache.org > Sub

Re: NPE when using Joda DateTime

2016-01-14 Thread Shixiong(Ryan) Zhu
*From:* Todd Nist [mailto:tsind...@gmail.com <tsind...@gmail.com>] > *Sent:* 14 January 2016 16:28 > *To:* Spencer, Alex (Santander) > *Cc:* Sean Owen; user@spark.apache.org > *Subject:* Re: NPE when using Joda DateTime > > > > I had a similar problem a wh