Usually you add exception handling within the transformations, in your case
you have it added in the driver code. This approach won't be able to catch
those exceptions happening inside the executor.
eg:
try {
val rdd = sc.parallelize(1 to 100)
rdd.foreach(x => throw new
Hello,
I had a question about error handling in Spark job: if an exception occurs
during the job, what is the best way to get notification of the failure?
Can Spark jobs return with different exit codes?
For example, I wrote a dummy Spark job just throwing out an Exception, as
follows:
import