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

[FLINK-21160][connector/kafka] Fix bug of referencing uninitialized deserializer when using KafkaRecordDeserializer#valueOnly #14784

Merged
merged 1 commit into from
Mar 19, 2021

Conversation

PatrickRen
Copy link
Contributor

What is the purpose of the change

This pull request fixes bug of referencing uninitialized deserializer in ValueDeserializerWrapper when using KafkaRecordDeserializer#valueOnly, which would lead to NPE at job compiling stage.

Brief change log

  • Keep the deserializeClass directly in the instance of ValueDeserializerWrapper as a member instead of storing the name of the class
  • Add an IT case for testing value only deserializer.

Verifying this change

  • Added integration tests for using KafkaRecordDeserializer#valueOnly to build a KafkaSource

Does this pull request potentially affect one of the following parts:

  • Dependencies (does it add or upgrade a dependency): (no)
  • The public API, i.e., is any changed class annotated with @Public(Evolving): (no)
  • The serializers: (no)
  • The runtime per-record code paths (performance sensitive): (no)
  • Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn/Mesos, ZooKeeper: (no)
  • The S3 file system connector: (no)

Documentation

  • Does this pull request introduce a new feature? (no)
  • If yes, how is the feature documented? (not applicable)

@flinkbot
Copy link
Collaborator

Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community
to review your pull request. We will use this comment to track the progress of the review.

Automated Checks

Last check on commit c327e27 (Thu Jan 28 03:55:21 UTC 2021)

Warnings:

  • No documentation files were touched! Remember to keep the Flink docs up to date!
  • This pull request references an unassigned Jira ticket. According to the code contribution guide, tickets need to be assigned before starting with the implementation work.

Mention the bot in a comment to re-run the automated checks.

Review Progress

  • ❓ 1. The [description] looks good.
  • ❓ 2. There is [consensus] that the contribution should go into to Flink.
  • ❓ 3. Needs [attention] from.
  • ❓ 4. The change fits into the overall [architecture].
  • ❓ 5. Overall code [quality] is good.

Please see the Pull Request Review Guide for a full explanation of the review process.


The Bot is tracking the review progress through labels. Labels are applied according to the order of the review items. For consensus, approval by a Flink committer of PMC member is required Bot commands
The @flinkbot bot supports the following commands:

  • @flinkbot approve description to approve one or more aspects (aspects: description, consensus, architecture and quality)
  • @flinkbot approve all to approve all aspects
  • @flinkbot approve-until architecture to approve everything until architecture
  • @flinkbot attention @username1 [@username2 ..] to require somebody's attention
  • @flinkbot disapprove architecture to remove an approval you gave earlier

@flinkbot
Copy link
Collaborator

flinkbot commented Jan 28, 2021

CI report:

Bot commands The @flinkbot bot supports the following commands:
  • @flinkbot run travis re-run the last Travis build
  • @flinkbot run azure re-run the last Azure build

@lindong28
Copy link
Member

Thanks for the PR. The PR looks good to me. I verified that the test fails before the change and passes after the change.

Ping @becketqin for review.

@lindong28
Copy link
Member

@flinkbot run azure

@PatrickRen
Copy link
Contributor Author

I investigated two Azure builds and both two CI failure are caused by E2E tests. The first E2E run was timed out, and the second one failed because of a K8S session test, looks like K8S deployment failure. I'm not quite familiar with K8S but it seems irrelevant with this PR.

I'll trigger Azure build again for another try.

@PatrickRen
Copy link
Contributor Author

@flinkbot run azure

@HuangXingBo
Copy link
Contributor

Hi @PatrickRen The failed python test has been resolved in FLINK-21216. I think you need to rebase master and push again.

@lindong28
Copy link
Member

@PatrickRen It is better to rebase PR onto master HEAD (particularly if the PR is more than several days older) in such cases. It is because we need to do best effort to make sure the PR passes all tests in the master HEAD. And it is possible that the bug has already been fixed in the HEAD.

…d of class name to avoid NPE when invoking getProducedType
@PatrickRen
Copy link
Contributor Author

Thank you @HuangXingBo and @lindong28 ! I just rebased the branch to master and pushed again. Hope we can pass all tests on Azure this time~

@PatrickRen
Copy link
Contributor Author

@flinkbot run azure

@PatrickRen
Copy link
Contributor Author

Finally we have a successfully run Azure build. @becketqin @lindong28 Could you please have a review on this PR? Thanks~

@lindong28
Copy link
Member

Thanks for the update! LGTM.

@becketqin
Copy link
Contributor

@flinkbot run azure

@becketqin becketqin merged commit 844601b into apache:master Mar 19, 2021
@becketqin
Copy link
Contributor

Thanks for the patch. LGTM.

Merged to master:
844601b

jnh5y pushed a commit to jnh5y/flink that referenced this pull request Dec 18, 2023
…d of class name to avoid NPE when invoking getProducedType (apache#14784)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants