aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKoert Kuipers <koert@tresata.com>2014-05-14 00:10:12 -0700
committerAaron Davidson <aaron@databricks.com>2014-05-14 00:12:35 -0700
commitb22952fa1f21c0b93208846b5e1941a9d2578c6f (patch)
tree1e3d11d7b95040eb3f12c5ce4a80706f27d3ec4b
parent6ce0884446d3571fd6e9d967a080a59c657543b1 (diff)
downloadspark-b22952fa1f21c0b93208846b5e1941a9d2578c6f.tar.gz
spark-b22952fa1f21c0b93208846b5e1941a9d2578c6f.tar.bz2
spark-b22952fa1f21c0b93208846b5e1941a9d2578c6f.zip
SPARK-1801. expose InterruptibleIterator and TaskKilledException in deve...
...loper api Author: Koert Kuipers <koert@tresata.com> Closes #764 from koertkuipers/feat-rdd-developerapi and squashes the following commits: 8516dd2 [Koert Kuipers] SPARK-1801. expose InterruptibleIterator and TaskKilledException in developer api
-rw-r--r--core/src/main/scala/org/apache/spark/InterruptibleIterator.scala6
-rw-r--r--core/src/main/scala/org/apache/spark/TaskKilledException.scala8
2 files changed, 11 insertions, 3 deletions
diff --git a/core/src/main/scala/org/apache/spark/InterruptibleIterator.scala b/core/src/main/scala/org/apache/spark/InterruptibleIterator.scala
index ec11dbbffa..f40baa8e43 100644
--- a/core/src/main/scala/org/apache/spark/InterruptibleIterator.scala
+++ b/core/src/main/scala/org/apache/spark/InterruptibleIterator.scala
@@ -17,11 +17,15 @@
package org.apache.spark
+import org.apache.spark.annotation.DeveloperApi
+
/**
+ * :: DeveloperApi ::
* An iterator that wraps around an existing iterator to provide task killing functionality.
* It works by checking the interrupted flag in [[TaskContext]].
*/
-private[spark] class InterruptibleIterator[+T](val context: TaskContext, val delegate: Iterator[T])
+@DeveloperApi
+class InterruptibleIterator[+T](val context: TaskContext, val delegate: Iterator[T])
extends Iterator[T] {
def hasNext: Boolean = {
diff --git a/core/src/main/scala/org/apache/spark/TaskKilledException.scala b/core/src/main/scala/org/apache/spark/TaskKilledException.scala
index cbd6b2866e..ad487c4efb 100644
--- a/core/src/main/scala/org/apache/spark/TaskKilledException.scala
+++ b/core/src/main/scala/org/apache/spark/TaskKilledException.scala
@@ -17,7 +17,11 @@
package org.apache.spark
+import org.apache.spark.annotation.DeveloperApi
+
/**
- * Exception for a task getting killed.
+ * :: DeveloperApi ::
+ * Exception thrown when a task is explicitly killed (i.e., task failure is expected).
*/
-private[spark] class TaskKilledException extends RuntimeException
+@DeveloperApi
+class TaskKilledException extends RuntimeException