Skip to content
Snippets Groups Projects
Commit b22952fa authored by Koert Kuipers's avatar Koert Kuipers Committed by Aaron Davidson
Browse files

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
parent 6ce08844
No related branches found
No related tags found
No related merge requests found
...@@ -17,11 +17,15 @@ ...@@ -17,11 +17,15 @@
package org.apache.spark package org.apache.spark
import org.apache.spark.annotation.DeveloperApi
/** /**
* :: DeveloperApi ::
* An iterator that wraps around an existing iterator to provide task killing functionality. * An iterator that wraps around an existing iterator to provide task killing functionality.
* It works by checking the interrupted flag in [[TaskContext]]. * 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] { extends Iterator[T] {
def hasNext: Boolean = { def hasNext: Boolean = {
......
...@@ -17,7 +17,11 @@ ...@@ -17,7 +17,11 @@
package org.apache.spark 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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment