You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "lamber-ken (JIRA)" <ji...@apache.org> on 2019/03/14 12:40: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 ]
lamber-ken updated FLINK-11820:
-------------------------------
Summary: SimpleStringSchema handle message record which value is null (was: KafkaDeserializationSchemaWrapper should handle record which value is null)
> SimpleStringSchema handle message record which value is null
> ------------------------------------------------------------
>
> Key: FLINK-11820
> URL: https://issues.apache.org/jira/browse/FLINK-11820
> Project: Flink
> Issue Type: Improvement
> Components: Connectors / Kafka
> Affects Versions: 1.7.2
> Reporter: lamber-ken
> Assignee: lamber-ken
> Priority: Critical
> Fix For: 1.7.3
>
>
> 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)