3

I'm looking to map Avro models. Given an input of Avro A, I need to transform it and return back Avro B.

The use case is that I receive Avro models from a service, transform them to match our use case, and restore them in a new Avro model.

Currently I'm looking into Dozer as a possibility, but I'm wondering if I'm missing something or if there are better options out there.

Googling about isn't yielding much, or I'm searching for the completely wrong things. Avro returns random plane parts, and map tends to get confused with the Java variant of a Hash, making it interesting to find results for. For context, I refer to map as a function that is applied to a list of elements to transform them.

baweaver
  • 304
  • 1
  • 12
  • can you be more specific? you are looking something automated, declarative? why just writing a piece of code (`AvroA convert(AvroB) {...}`) doesn't work? – RomanI Jun 06 '14 at 06:40
  • We are going through the same learning curve and I'm currently looking at Dozer as well. Is this what you ended up using? How did it work out? – John Jun 06 '20 at 14:39

1 Answers1

4

Dozer seems great, you can also take a look at Orika: https://code.google.com/p/orika/ which has many features and great performance.

You can check this blog post where there is a benchmark: http://blog.sokolenko.me/2013/05/dozer-vs-orika-vs-manual.html

Orika is way faster than Dozer and quite close to "manual" mapping.

zenbeni
  • 7,019
  • 3
  • 29
  • 60