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/05/15 06:06:00 UTC
[jira] [Updated] (FLINK-12400) NullpointerException using
SimpleStringSchema with Kafka
[ https://issues.apache.org/jira/browse/FLINK-12400?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
lamber-ken updated FLINK-12400:
-------------------------------
Environment:
* Flink 1.7.2 job on 1.8 cluster
* Kafka 0.10 with a topic in log-compaction
was:
Flink 1.7.2 job on 1.8 cluster
Kafka 0.10 with a topic in log-compaction
> 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)