-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Add config and header support for confluent schema registry. #10314
Conversation
06bf980
to
1b67a2f
Compare
26e49d0
to
765ed31
Compare
…ncies for integration-tests
7cd9813
to
72f5e4c
Compare
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.
👍
@@ -63,7 +73,7 @@ public GenericRecord parse(ByteBuffer bytes) | |||
int id = bytes.getInt(); // extract schema registry id | |||
int length = bytes.limit() - 1 - 4; | |||
int offset = bytes.position() + bytes.arrayOffset(); | |||
Schema schema = registry.getByID(id); | |||
Schema schema = registry.getById(id); |
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 seems like this method is deprecated as well, but it doesn't really seem like there is a better replacement since the underlying method is doing this
ParsedSchema schema = this.getSchemaById(id);
return schema instanceof AvroSchema ? ((AvroSchema)schema).rawSchema() : 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.
Updated to use getSchemaById, which is anyway overridden by the CachedSchemaRegistryClient implementation that is being used here.
EDIT: actually just used that piece of code, it makes more sense I think, in case getById() gets changed in the future
Co-authored-by: Clint Wylie <cjwylie@gmail.com>
8443878
to
2925492
Compare
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, thanks @spinatelli 👍
Hello all, |
Yea something like that would be the next step, I might look into it in the next week |
(porting code from #9096)
Fixes #8806.
Description
This is an update to the code in PR 9096 (#9096), since it's stale. I report the original description and the changes I made
Enhancing schema registry client i.e. SchemaRegistryBasedAvroBytesDecoder to accept additional configs, headers and able to query schemas from multi schema registry instances.
Key changed/added classes in this PR
This PR has:
Key changed/added classes in this PR
SchemaRegistryBasedAvroBytesDecoder
SchemaRegistryBasedAvroBytesDecoderTest