question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Avro Marshallers for Date and Timestamp

See original GitHub issue

It’d be handy to have frees-rpc providing optional marshallers for serializing and deserializing dates, with no reference to a particular time zone or time of day.

Avro specs: https://avro.apache.org/docs/current/spec.html#Date

Initially, we could support:

Date

The date logical type represents a date within the calendar, with no reference to a particular time zone or time of day.

Timestamp (millisecond precision)

The timestamp-millis logical type represents an instant on the global timeline, independent of a particular time zone or calendar, with a precision of one millisecond.

As we need to take into account Java 1.7, we could create two new different sbt modules (artifacts):

  • frees-rpc-marshallers-jodatime: Java 1.7 users could include this one to serialize/deserialize dates based on:
  • frees-rpc-marshallers-javatime: Java +1.8 users could include this one to serialize/deserialize dates based on

These two new modules can be placed at modules/marshallers/jodatime and modules/marshallers/javatime, respectively.

Internally, as part of the serialization/deserialization process, we can use Long as intermediate bytes representation.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
fedefernandezcommented, Jul 30, 2018

IMO it’s completed

0reactions
juanpedromorenocommented, Jul 30, 2018

@fedefernandez @AntonioMateoGomez Do we need to do something else to complete this story? I think it might be completed after https://github.com/frees-io/freestyle-rpc/pull/373 and https://github.com/frees-io/freestyle-rpc/pull/374.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Avro Marshallers for Date and Timestamp · Issue #269 - GitHub
It'd be handy to have frees-rpc providing optional marshallers for serializing and deserializing dates, with no reference to a particular ...
Read more >
Solved: how to set timestamp data type in avro schema
Solved: I use convertjsontoavro + puthivestreaming processor: json { "name": "张三", - 121281.
Read more >
Index (Apache Avro Java 1.11.1 API)
Constructs converters that turn objects (usually from the output of a MR job) into Avro data that can be serialized. AvroDatumConverterFactory(Configuration) - ...
Read more >
Defining Avro schema in Java, how do I handle timestamps or ...
I dont know how to handle dates and timestamps when defining the Avro schema in Java. It doesn't give the option for Dates...
Read more >
protobuf-avro module - go.einride.tech/protobuf-avro - Go Packages
Functionality for converting between Protocol Buffers and Avro. This can for example be used to bulk load protobuf messages to BigQuery.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found