Github user rxin commented on a diff in the pull request:
https://github.com/apache/spark/pull/498#discussion_r11887038
--- Diff: core/src/main/scala/org/apache/spark/SparkContext.scala ---
@@ -381,16 +381,23 @@ class SparkContext(config: SparkConf) extends Logging
{
* // In a separate thread:
* sc.cancelJobGroup("some_job_to_cancel")
* }}}
+ *
+ * If interruptOnCancel is set to true for the job group, then job
cancellation will result
+ * in Thread.interrupt() being called on the job's executor threads.
This is useful to help ensure
+ * that the tasks are actually stopped in a timely manner, but is off by
default due to HDFS-1208,
+ * where HDFS may respond to Thread.interrupt() by marking nodes as dead.
*/
- def setJobGroup(groupId: String, description: String) {
+ def setJobGroup(groupId: String, description: String, interruptOnCancel:
Boolean = false) {
--- End diff --
Perhaps interruptOnCancel should be part of the cancel action? Then you
don't need this extra property which is kind of weird.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---