You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Gary Yao (Jira)" <ji...@apache.org> on 2019/09/03 09:13:00 UTC
[jira] [Closed] (FLINK-11820) SimpleStringSchema handle message
record which value is null
[ https://issues.apache.org/jira/browse/FLINK-11820?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Gary Yao closed FLINK-11820.
----------------------------
Resolution: Won't Fix
See https://github.com/apache/flink/pull/8583#issuecomment-527374604
> SimpleStringSchema handle message record which value is null
> ------------------------------------------------------------
>
> Key: FLINK-11820
> URL: https://issues.apache.org/jira/browse/FLINK-11820
> Project: Flink
> Issue Type: Bug
> Components: Connectors / Kafka
> Affects Versions: 1.7.2, 1.8.0
> Reporter: lamber-ken
> Assignee: lamber-ken
> Priority: Critical
> Labels: pull-request-available
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> when kafka msg queue contains some records which value is null, flink-kafka-connector can't process these records.
> for example, msg queue like bellow.
> |msg|{color:#ff0000}null{color}|msg|msg|msg|msg|
> for normal, use +SimpleStringSchema+ to process msg queue data
> {code:java}
> env.addSource(new FlinkKafkaConsumer010("topic", new SimpleStringSchema(), properties));
> {code}
> but, will get NullPointerException
> {code:java}
> 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)
> {code}
>
--
This message was sent by Atlassian Jira
(v8.3.2#803003)