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

[debezium] Fix JsonConverter Object NPE when program running on the c… #470

Merged
merged 11 commits into from
Nov 3, 2021

Conversation

minchowang
Copy link
Contributor

…luster

@minchowang
Copy link
Contributor Author

minchowang commented Sep 28, 2021

User feedback case:

  • runing on the local:
    image
  • runing on the cluster:
    image

@minchowang
Copy link
Contributor Author

  • Running test case on the cluster :
    About configuring the relevant code for JsonConverterConfig only Configure once when a container was deploy.
    image

Comment on lines 40 to 42

private static final JsonConverter CONVERTER = new JsonConverter();

Copy link
Contributor

Choose a reason for hiding this comment

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

I think the root cause is JsonConverter is not serializable

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes,can you have any good ways to solution this?

Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry for the late reply, you can defined private transient JsonConverter jsonConverter; and then lazily initialize it
like

if (jsonConverter == null) {
    // initialize it
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

all right

Copy link
Contributor

@leonardBang leonardBang left a comment

Choose a reason for hiding this comment

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

Thanks @mincwang for the contribution, LGTM, could you also check the change works in cluster?

@minchowang
Copy link
Contributor Author

Thanks @mincwang for the contribution, LGTM, could you also check the change works in cluster?

ok, I will fix it later along with code style

@leonardBang leonardBang merged commit 5ec35a8 into apache:master Nov 3, 2021
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

Successfully merging this pull request may close these issues.

None yet

2 participants