You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Yu Li (JIRA)" <ji...@apache.org> on 2019/05/05 04:11:00 UTC

[jira] [Updated] (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 ]

Yu Li updated FLINK-11820:
--------------------------
    Affects Version/s: 1.8.0
        Fix Version/s:     (was: 1.7.3)
           Issue Type: Bug  (was: Improvement)

> 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
>
> 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
(v7.6.3#76005)