Skip to content

Commit 8516dd2

Browse files
committed
SPARK-1801. expose InterruptibleIterator and TaskKilledException in developer api
1 parent 8586bf5 commit 8516dd2

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

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

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

1818
package org.apache.spark
1919

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

2730
def hasNext: Boolean = {

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@
1717

1818
package org.apache.spark
1919

20+
import org.apache.spark.annotation.DeveloperApi
21+
2022
/**
2123
* Exception for a task getting killed.
2224
*/
23-
private[spark] class TaskKilledException extends RuntimeException
25+
@DeveloperApi
26+
class TaskKilledException extends RuntimeException

0 commit comments

Comments
 (0)