You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2019/03/25 13:49:39 UTC

[GitHub] [pulsar] svolland opened a new issue #3896: ElasticSearchSink throws an NPE on records having a null key

svolland opened a new issue #3896: ElasticSearchSink throws an NPE on records having a null key
URL: https://github.com/apache/pulsar/issues/3896
 
 
   **Describe the bug**
   ElasticSearchSink throws NPEs on records having an empty key. There is an error in the extractKeyValue() method on the line extracting the key:
   `String key = record.getKey().orElseGet(null);`
   This probably should be corrected to:
   `String key = record.getKey().orElse(null);`
   
   **To Reproduce**
   Run an ElasticSearchSink on a topic which records have empty keys
   
   **Expected behavior**
   Null keys should be ignored and records successfully pushed into elastic search
   
   
   **Additional context**
   Tested with Pulsar v2.3.0
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services