I am working on a Java-based Spark Streaming application that responds to messages that go through the Kafka theme. For each message, the application does some processing and writes the results to another Kafka topic.
Sometimes, due to unforeseen data problems, code that runs on RDD may fail and throw an exception. When this happens, I would like to have a common handler that could take the necessary actions and drop the message in the subject of the error. Right now, these exceptions are being written to Spark by Spark himself.
What is the best approach for this, instead of writing try-catch blocks for every block of code that runs on RDD?
apache-spark spark-streaming
Yohan liyanage
source share