Skip to content

Commit b22952f

Browse files
koertkuipersaarondav
authored andcommitted
SPARK-1801. expose InterruptibleIterator and TaskKilledException in deve...
...loper api Author: Koert Kuipers <[email protected]> Closes apache#764 from koertkuipers/feat-rdd-developerapi and squashes the following commits: 8516dd2 [Koert Kuipers] SPARK-1801. expose InterruptibleIterator and TaskKilledException in developer api
1 parent 6ce0884 commit b22952f

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

core/src/main/scala/org/apache/spark/InterruptibleIterator.scala

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,15 @@
1717

1818
package org.apache.spark
1919

20+
import org.apache.spark.annotation.DeveloperApi
21+
2022
/**
23+
* :: DeveloperApi ::
2124
* An iterator that wraps around an existing iterator to provide task killing functionality.
2225
* It works by checking the interrupted flag in [[TaskContext]].
2326
*/
24-
private[spark] class InterruptibleIterator[+T](val context: TaskContext, val delegate: Iterator[T])
27+
@DeveloperApi
28+
class InterruptibleIterator[+T](val context: TaskContext, val delegate: Iterator[T])
2529
extends Iterator[T] {
2630

2731
def hasNext: Boolean = {

core/src/main/scala/org/apache/spark/TaskKilledException.scala

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,11 @@
1717

1818
package org.apache.spark
1919

20+
import org.apache.spark.annotation.DeveloperApi
21+
2022
/**
21-
* Exception for a task getting killed.
23+
* :: DeveloperApi ::
24+
* Exception thrown when a task is explicitly killed (i.e., task failure is expected).
2225
*/
23-
private[spark] class TaskKilledException extends RuntimeException
26+
@DeveloperApi
27+
class TaskKilledException extends RuntimeException

0 commit comments

Comments
 (0)