pyspark.SparkContext.cancelAllJobs

SparkContext.cancelAllJobs() → None

Cancel all jobs that have been scheduled or are running.