agile-lab-dev / darwin

Avro Schema Evolution made easy
Apache License 2.0
34 stars 10 forks source link

It is not possible to understand a AvroSchemaManager configured endianess #72

Closed tmnd1991 closed 3 years ago

tmnd1991 commented 3 years ago

Scenario

As of 1.0.12 it's possible to configure the endianness used to write the Avro single object header.

Problem statement

Dependent projects (like Wasp), might use a mix of AvroSchemaManager and AvroSingleObjectEncodingUtils, unfortunately it is not easy to obtain the configured endianness of an AvroSchemaManager instance to pass it to AvroSingleObjectEncodingUtils, the only solution is to re-read the configuration object passed to AvroSchemaManagerFactory.

Proposed solution

Add a method getEndianness on AvroSchemaManager to return it. Also it would be useful to "mirror" all methods of AvroSingleObjectEncodingUtils into AvroSchemaManager removing endianness from the parameter list, so that one could only use AvroSchemaManager easily in its code.