apex-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Raja.Aravapalli <Raja.Aravapa...@target.com>
Subject Re: Application restarts
Date Mon, 20 Jun 2016 23:48:47 GMT

Thanks Ram.

I will test and let you know.


Regards,
Raja.

From: Munagala Ramanath <ram@datatorrent.com<mailto:ram@datatorrent.com>>
Reply-To: "users@apex.apache.org<mailto:users@apex.apache.org>" <users@apex.apache.org<mailto:users@apex.apache.org>>
Date: Monday, June 20, 2016 at 5:50 PM
To: "users@apex.apache.org<mailto:users@apex.apache.org>" <users@apex.apache.org<mailto:users@apex.apache.org>>
Subject: Re: Application restarts

If your field type is org.joda.time.DateTime and declared thus:

DateTime jodaDateTime;

How about just adding these imports:

import com.esotericsoftware.kryo.serializers.FieldSerializer.Bind;
import de.javakaffee.kryoserializers.jodatime.JodaDateTimeSerializer;

and adding this annotation just above the field declaration, like so:

@FieldSerializer.Bind(JodaDateTimeSerializer.class)
DateTime jodaDateTime;


Ram

On Mon, Jun 20, 2016 at 3:20 PM, Raja.Aravapalli <Raja.Aravapalli@target.com<mailto:Raja.Aravapalli@target.com>>
wrote:

Thanks a lot Ram for the response.

Yes, I am relaunching with application Id.

The usage related information in the documentation links are like bit heavy for the knowledge
I have… do we have a simple example on how to use?

By the way, I want to use JodaTime DateTime Serializer which are already available I believe.
Any help for using DateTime JodaDateTimeSerializer() ?

Thanks a lot.


Regards,
Raja.

From: Munagala Ramanath <ram@datatorrent.com<mailto:ram@datatorrent.com>>
Reply-To: "users@apex.apache.org<mailto:users@apex.apache.org>" <users@apex.apache.org<mailto:users@apex.apache.org>>
Date: Monday, June 20, 2016 at 4:32 PM
To: "users@apex.apache.org<mailto:users@apex.apache.org>" <users@apex.apache.org<mailto:users@apex.apache.org>>
Subject: Re: Application restarts

By "relaunches" I assume you mean you're launching with the previous application ID ?

When you do that, the platform attempts to restore state from the previously saved serialized
form.
To do that, it needs to firstcreate the object with a no-arg constructor and then populate
it.
If that constructor is absent, you get the exception.

Please see the section entitled "Application throwing following Kryo exception"
at http://docs.datatorrent.com/troubleshooting/#application-throwing-following-kryo-exception

Ram

On Mon, Jun 20, 2016 at 1:32 PM, Raja.Aravapalli <Raja.Aravapalli@target.com<mailto:Raja.Aravapalli@target.com>>
wrote:

Hi,

During application relaunches I am getting serialization exceptions like below, but not when
launching the application for the first time ….


Caused by: com.esotericsoftware.kryo.KryoException: Class cannot be created (missing no-arg
constructor): org.joda.time.chrono.ISOChronology
Serialization trace:
iChronology (org.joda.time.DateTime)



I am seeing these exception only when doing relaunches not for the first time launching!!
Relaunch can be any of the scenario like, KILLED or SHUTDOWN!!


Please share you thoughts….



Regards,

Raja.


Mime
View raw message