lamber-ken opened a new pull request #7987: SimpleStringSchema handle message 
record which value is null
URL: https://github.com/apache/flink/pull/7987
 
 
   ## What is the purpose of the change
   
   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.
   <table class="table table-bordered table-striped table-condensed">
       <tr>
           <td>msg</td>
           <td>null</td>
           <td>msg</td>
           <td>msg</td>
           <td>msg</td>
       </tr>
   </table>
   
    for normal, use **SimpleStringSchema** to process msg queue data
   ```
   env.addSource(new FlinkKafkaConsumer010("topic", new SimpleStringSchema(), 
properties));
   ```
    but, will get NullPointerException
   
   ```
   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)
   ```
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to