Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Java and Python AVRO compatibility - stringType #21

Closed
slominskir opened this issue May 13, 2021 · 3 comments
Closed

Java and Python AVRO compatibility - stringType #21

slominskir opened this issue May 13, 2021 · 3 comments

Comments

@slominskir
Copy link
Member

@slominskir
Copy link
Member Author

slominskir commented Nov 9, 2021

My pull request has been ignored for months: apache/avro#1235. In the meantime, Confluent has added a new flag to work around this issue:

KafkaAvroSerializerConfig.AVRO_REMOVE_JAVA_PROPS_CONFIG = true

Notes:
https://github.com/JeffersonLab/jaws/wiki/AVRO-Schema-Peculiarities#java-specific-logical-types

@slominskir
Copy link
Member Author

slominskir commented Nov 10, 2021

It seems the easiest path forward at this point is to simply accept the Java AVRO compiler's demands that AVRO schemas must have Java specific types. Initial testing suggests this fixes the issue - Python scripts appear to silently ignore unrecognized logical type and inherit the logical base type string. Using the new AVRO_REMOVE_JAVA_PROPS_CONFIG option means we would need to move apps to the bleeding edge version of confluent libs, which is a whole can of worms I don't want to open at the moment.

However, I've noticed the AlarmOverrideUnion.avsc is bumped to version 2 the first time set-override.py is executed. However, executing set-activation.py does not bump AlarmActivationUnion.avsc. No Java Kafka Streams apps are even running. Using describe-version.py to dump both version 1 and 2 then running diff reveals they're identical. Maybe a separate issue? More investigation needed.

@slominskir
Copy link
Member Author

I've created a separate issue for this new anomaly: #28.

I'm closing this issue for now, as the ugly fix of simply accepting that our schemas have Java specific logical types appears to be working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant