[ https://issues.apache.org/jira/browse/FLINK-12400?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16833187#comment-16833187 ]
Congxian Qiu(klion26) edited comment on FLINK-12400 at 5/5/19 1:52 AM: ----------------------------------------------------------------------- [~PierreZ] thanks for filing this issue, I think there is already an issue want to fix this, please have a look at https://issues.apache.org/jira/browse/FLINK-11820 And a pr for FLINK-11820 [https://github.com/apache/flink/pull/7987] was (Author: klion26): [~PierreZ] thanks for filing this issue, I think there is already an issue want to fix this, please have a look at https://issues.apache.org/jira/browse/FLINK-11820 > NullpointerException using SimpleStringSchema with Kafka > -------------------------------------------------------- > > Key: FLINK-12400 > URL: https://issues.apache.org/jira/browse/FLINK-12400 > Project: Flink > Issue Type: Improvement > Components: API / Type Serialization System > Affects Versions: 1.7.2, 1.8.0 > Environment: Flink 1.7.2 job on 1.8 cluster > Kafka 0.10 with a topic in log-compaction > Reporter: Pierre Zemb > Assignee: Pierre Zemb > Priority: Minor > > Hi! > Yesterday, we saw a strange behavior with our Flink job and Kafka. We are > consuming a Kafka topic setup in > [log-compaction|https://kafka.apache.org/documentation/#compaction] mode. As > such, sending a message with a null payload acts like a tombstone. > We are consuming Kafka like this: > {code:java} > new FlinkKafkaConsumer010<> ("topic", new SimpleStringSchema(), > this.kafkaProperties) > {code} > When we sent the message, job failed because of a NullPointerException > [here|https://github.com/apache/flink/blob/master/flink-core/src/main/java/org/apache/flink/api/common/serialization/SimpleStringSchema.java#L75]. > `byte[] message` was null, causing the NPE. > We forked the class and added a basic nullable check, returning null if so. > It fixed our issue. > Should we add it to the main class? -- This message was sent by Atlassian JIRA (v7.6.3#76005)