Open GoogleCodeExporter opened 9 years ago
Pretty much a straight copy of the DateSerializer.
static public class TimestampSerializer extends Serializer<Timestamp> {
public void write(Kryo kryo, Output output, Timestamp object) {
output.writeLong(object.getTime(), true);
}
public Timestamp read(Kryo kryo, Input input, Class<Timestamp> type) {
return new Timestamp(input.readLong(true));
}
public Timestamp copy(Kryo kryo, Timestamp original) {
return new Timestamp(original.getTime());
}
}
Then you just register it.
kryo.addDefaultSerializer(Timestamp.class, TimestampSerializer.class);
Original comment by jonathan...@gmail.com
on 22 Jan 2013 at 10:42
Hello. Has this issue been resolved? I've just got this exact issue in my app.
Original comment by ngocdaot...@gmail.com
on 21 Mar 2013 at 9:23
I'm observing a similar issue with Joda time's LocalDate class. Not in
Cascalog specifically (the below link), but in the combination of Spark, Kryo,
and Joda time.
https://groups.google.com/forum/#!topic/cascalog-user/35cdnNIamKU
Original comment by Ash...@gmail.com
on 24 Apr 2013 at 7:57
Issues have been moved to github, this one is now
https://github.com/EsotericSoftware/kryo/issues/88, can we proceed there?
Original comment by martin.grotzke
on 13 Nov 2013 at 11:26
Original issue reported on code.google.com by
selene.f...@artemicode.de
on 6 Sep 2012 at 7:04