-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[improve][client] Add classLoader field for SchemaDefinition
#15915
Conversation
…er().withJsonDef()`
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
/pulsarbot run-failure-checks |
1 similar comment
/pulsarbot run-failure-checks |
Hi @coderzc We re-run the test many times, but the test still fails. Could you take a look? |
ok |
/pulsarbot run-failure-checks |
/pulsarbot run-failure-checks |
b42e1db
to
b0dac72
Compare
b0dac72
to
36b723c
Compare
SchemaDefinition.<T>builder().withJsonDef()
SchemaDefinition
f112576
to
7325c67
Compare
* | ||
* @return schema definition builder | ||
*/ | ||
SchemaDefinitionBuilder<T> withClassLoader(ClassLoader classLoader); |
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.
If need to add a public API to fix the issue, it should start with a proposal first.
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.
OK, I have been submitted a PIP: #16058
SchemaDefinition
SchemaDefinition
SchemaDefinition
SchemaDefinition
Fixes #15899 ### Motivation Now, don‘t register logical type conversions when use `SchemaDefinition.<T>builder().withJsonDef()` beacase it without classLoader param. See: https://github.com/apache/pulsar/blob/04aa9e8e51869d1621a7e25402a656084eebfc09/pulsar-client/src/main/java/org/apache/pulsar/client/impl/schema/reader/AvroReader.java#L58-L68 We can add the classLoader field for `SchemaDefinition`, user can manually pass a classLoader to register logical type conversions ### Modifications Add classLoader field for `SchemaDefinition` (cherry picked from commit 8434500)
Fixes #15899 ### Motivation Now, don‘t register logical type conversions when use `SchemaDefinition.<T>builder().withJsonDef()` beacase it without classLoader param. See: https://github.com/apache/pulsar/blob/04aa9e8e51869d1621a7e25402a656084eebfc09/pulsar-client/src/main/java/org/apache/pulsar/client/impl/schema/reader/AvroReader.java#L58-L68 We can add the classLoader field for `SchemaDefinition`, user can manually pass a classLoader to register logical type conversions ### Modifications Add classLoader field for `SchemaDefinition` (cherry picked from commit 8434500)
) Fixes apache#15899 ### Motivation Now, don‘t register logical type conversions when use `SchemaDefinition.<T>builder().withJsonDef()` beacase it without classLoader param. See: https://github.com/apache/pulsar/blob/04aa9e8e51869d1621a7e25402a656084eebfc09/pulsar-client/src/main/java/org/apache/pulsar/client/impl/schema/reader/AvroReader.java#L58-L68 We can add the classLoader field for `SchemaDefinition`, user can manually pass a classLoader to register logical type conversions ### Modifications Add classLoader field for `SchemaDefinition` (cherry picked from commit 8434500) (cherry picked from commit ea20a89)
Fixes #15899
Motivation
Now, don‘t register logical type conversions when use
SchemaDefinition.<T>builder().withJsonDef()
beacase it without classLoader param.See:
pulsar/pulsar-client/src/main/java/org/apache/pulsar/client/impl/schema/reader/AvroReader.java
Lines 58 to 68 in 04aa9e8
We can add the classLoader field for
SchemaDefinition
, user can manually pass a classLoader to register logical type conversionsModifications
Add classLoader field for
SchemaDefinition
Verifying this change
(Please pick either of the following options)
This change added tests and can be verified
Documentation
Check the box below or label this PR directly.
Need to update docs?
doc-required
(Your PR needs to update docs and you will update later)
doc-not-needed
(Please explain why)
doc
(Your PR contains doc changes)
doc-complete
(Docs have been already added)