murong00 opened a new pull request #11192: URL: https://github.com/apache/pulsar/pull/11192
### Motivation When the record has a null key, someone maybe confused by a NPE warn as below: ``` 11:26:22.730 [pool-5-thread-1] WARN org.apache.pulsar.io.redis.sink.RedisSink - Record flush thread was exception java.lang.NullPointerException: null at java.util.concurrent.ConcurrentHashMap.putVal(ConcurrentHashMap.java:1011) ~[?:1.8.0_291] at java.util.concurrent.ConcurrentHashMap.put(ConcurrentHashMap.java:1006) ~[?:1.8.0_291] at org.apache.pulsar.io.redis.sink.RedisSink.flush(RedisSink.java:127) ~[pulsar-io-redis-2.8.0.nar-unpacked/:?] at org.apache.pulsar.io.redis.sink.RedisSink.lambda$write$1(RedisSink.java:94) ~[pulsar-io-redis-2.8.0.nar-unpacked/:?] ``` We can use the value of record as key when its key is null as other sinks do. ### Modifications - Use the value of record as key when its key is null. -- 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. To unsubscribe, e-mail: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org