Throw useful exception when user saves to Cassandra with null partition key
Description
I had a bug in my code where I was calling javaFunctions(rdd).writerBuilder(...).saveToCassandra() but I had left the partition key null on some of the pojos in the RDD I was saving. That gave an NPE with the following stack trace:
Having a null partition key seems like a fairly simple error for the connector to catch, but the exception/stack trace provide no immediate indication of what the problem was, making it harder to diagnose on my end. It would be great to have a more informative exception.
I had a bug in my code where I was calling javaFunctions(rdd).writerBuilder(...).saveToCassandra() but I had left the partition key null on some of the pojos in the RDD I was saving. That gave an NPE with the following stack trace:
Having a null partition key seems like a fairly simple error for the connector to catch, but the exception/stack trace provide no immediate indication of what the problem was, making it harder to diagnose on my end. It would be great to have a more informative exception.