Also, it would be good to chance the handleJobCancellation() method to accept a string exceptionMessage parameter to use when creating the SparkException.  For the normal case it can stay as "Job X cancelled", but for this case we can say "Job X cancelled because stage Y was cancelled" to make it more clear to the user what's going on.