Skip to content

Conversation

@lamberken
Copy link
Member

@lamberken lamberken commented Mar 14, 2019

What is the purpose of the change

when kafka msg queue contains some records which value is null, SimpleStringSchema can't process these records.

for example, msg queue like bellow.

msg null msg msg msg

for normal, use SimpleStringSchema to process msg queue data

env.addSource(new FlinkKafkaConsumer010("topic", new SimpleStringSchema(), properties));

but, will get NullPointerException

java.lang.NullPointerException
	at java.lang.String.<init>(String.java:515)
	at org.apache.flink.api.common.serialization.SimpleStringSchema.deserialize(SimpleStringSchema.java:75)
	at org.apache.flink.api.common.serialization.SimpleStringSchema.deserialize(SimpleStringSchema.java:36)

@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.

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.

Details
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

@lamberken lamberken changed the title SimpleStringSchema handle message record which value is null [FLINK-11820][serialization] SimpleStringSchema handle message record which value is null Mar 14, 2019
@klion26
Copy link
Member

klion26 commented Mar 15, 2019

Nice catch, and thank you for your contribution @lamber-ken. we should avoid git merge in the git history and use git rebase instead.

I not every sure whether we have to add a ut for this.

@lamberken
Copy link
Member Author

@klion26, I see, thanks.

@lamberken
Copy link
Member Author

lamberken commented Mar 18, 2019

@klion26, hi, I have updated the pr as you suggest, thanks

@lamberken
Copy link
Member Author

@klion26,cc

@klion26
Copy link
Member

klion26 commented Apr 5, 2019

thanks for you contribution, LGTM now

@carp84
Copy link
Member

carp84 commented May 5, 2019

@aljoscha @tzulitai Mind take a look here? Thanks.

@PierreZ
Copy link
Contributor

PierreZ commented May 5, 2019

Hi!

Quick message to say that we hit the same problem this week, and applied a similar patch that mitigated the issue.

@lamberken
Copy link
Member Author

hi, @GJL @tillrohrmann, this pr fix NPE in some scenarioscan, can you take a look here? Thanks.

@lamberken
Copy link
Member Author

Hi @GJL,

Thanks for your review and your comment is great for me. But my branch has been deleted unexpectly, so I can't commit anything, need I open a new PR?

@GJL
Copy link
Member

GJL commented May 31, 2019

@lamber-ken I think yes. You can try to recover the commits via: https://help.github.com/en/articles/checking-out-pull-requests-locally

@lamberken
Copy link
Member Author

@lamber-ken I think yes. You can try to recover the commits via: https://help.github.com/en/articles/checking-out-pull-requests-locally

@GJL, I open a new PR, and update it as your comment, see #8583

@lamberken lamberken closed this May 31, 2019
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.

7 participants