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

[pulsar-io] Using ObjectMapper instead of Gson to parse Source/SInk configuration #10441

Merged
merged 4 commits into from
May 1, 2021

Conversation

abhilashmandaliya
Copy link
Contributor

Fixes #10440

Motivation

Data types should be preserved after deserializing the sink/source config.

Modifications

Using ObjectMapper instead of Gson to parse the config.

This change added tests and can be verified as follows:

(example:)

  • Added unit tests

  • The schema: don't know

fixed minor issue in closing some of the PulsarClientImpl resources
private void shutdownEventLoopGroup(EventLoopGroup eventLoopGroup) throws PulsarClientException {
if (createdEventLoopGroup && !eventLoopGroup.isShutdown()) {
if (createdEventLoopGroup && eventLoopGroup != null && !eventLoopGroup.isShutdown()) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was throwing an exception when this method was called from constructor if the exception was thrown before assigning parameter passed eventLoopGroup to the member variable eventLoopGroup. The same is for the cnxPool.

@abhilashmandaliya abhilashmandaliya changed the title Using ObjectMapper instead of Gson to parse Source/SInk configuration [pulsar-io] Using ObjectMapper instead of Gson to parse Source/SInk configuration Apr 29, 2021
@abhilashmandaliya
Copy link
Contributor Author

@MarvinCai @eolivelli @315157973 @lhotari kindly review it

@abhilashmandaliya
Copy link
Contributor Author

/pulsarbot run-failure-checks

@merlimat merlimat added the type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages label Apr 29, 2021
@merlimat merlimat added this to the 2.8.0 milestone Apr 29, 2021
@abhilashmandaliya
Copy link
Contributor Author

/pulsarbot run-failure-checks

@merlimat merlimat merged commit 900547f into apache:master May 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sink config parsing doesn't preserve the original data type
3 participants