-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Rename to SchemaRegistryApacheAvroSerializer. Group name is optional. #24622
Conversation
API changes have been detected in |
API changes have been detected in |
* @param maxCacheSize The maximum cache size for the serializer. | ||
*/ | ||
SerializerOptions(String schemaGroup, boolean autoRegisterSchemas, int maxCacheSize) { | ||
this.schemaGroup = schemaGroup; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this be null? Previously, this was a required field and we had a null check in the serializer constructor. If this can't be null, let's add a null check here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It can be null now. From the arch board review, if you're only using it for deserialization, the stream contains the ID which is globally unique, so you can just get by an id without the schema group.
...-schemaregistry-avro/src/main/java/com/azure/data/schemaregistry/avro/SerializerOptions.java
Outdated
Show resolved
Hide resolved
@@ -26,26 +26,31 @@ | |||
/** | |||
* Schema Registry-based serializer implementation for Avro data format. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update the javadoc as well to specify that this is Apache Avro data format.
* | ||
* @return The maximum cache size. | ||
*/ | ||
int getMaxCacheSize() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be long
? I don't expect the cache size to be beyond max int but do we want to have the flexibility?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For GA, we are not exposing this max cache size to be configurable; so in November, it'll just be 128. It won't be a breaking change if we decide after GA to expose the cache options.
} else if (Objects.isNull(context)) { | ||
return FluxUtil.monoError(logger, new NullPointerException("'context' should not be null.")); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Context can be null and if it is, we should use Context.NONE and not throw.
…a/com/azure/data/schemaregistry/avro/SerializerOptions.java Co-authored-by: Srikanta <51379715+srnagar@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
schemaFormat
->format
to align with other languages.Related #24221