public class TaskContextImpl extends TaskContext implements Logging
| Constructor and Description |
|---|
TaskContextImpl(int stageId,
int partitionId,
long attemptId,
boolean runningLocally,
org.apache.spark.executor.TaskMetrics taskMetrics) |
| Modifier and Type | Method and Description |
|---|---|
void |
addOnCompleteCallback(scala.Function0<scala.runtime.BoxedUnit> f) |
TaskContextImpl |
addTaskCompletionListener(scala.Function1<TaskContext,scala.runtime.BoxedUnit> f) |
TaskContextImpl |
addTaskCompletionListener(TaskCompletionListener listener)
Add a (Java friendly) listener to be executed on task completion.
|
long |
attemptId() |
boolean |
isCompleted()
Whether the task has completed.
|
boolean |
isInterrupted()
Whether the task has been killed.
|
boolean |
isRunningLocally() |
void |
markInterrupted()
Marks the task for interruption, i.e.
|
void |
markTaskCompleted()
Marks the task as completed and triggers the listeners.
|
int |
partitionId() |
boolean |
runningLocally() |
int |
stageId() |
org.apache.spark.executor.TaskMetrics |
taskMetrics()
::DeveloperApi::
|
addOnCompleteCallback, addTaskCompletionListener, getequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitinitializeIfNecessary, initializeLogging, isTraceEnabled, log_, log, logDebug, logDebug, logError, logError, logInfo, logInfo, logName, logTrace, logTrace, logWarning, logWarningpublic TaskContextImpl(int stageId,
int partitionId,
long attemptId,
boolean runningLocally,
org.apache.spark.executor.TaskMetrics taskMetrics)
public int stageId()
stageId in class TaskContextpublic int partitionId()
partitionId in class TaskContextpublic long attemptId()
attemptId in class TaskContextpublic boolean runningLocally()
runningLocally in class TaskContextpublic org.apache.spark.executor.TaskMetrics taskMetrics()
TaskContexttaskMetrics in class TaskContextpublic TaskContextImpl addTaskCompletionListener(TaskCompletionListener listener)
TaskContextaddTaskCompletionListener in class TaskContextpublic TaskContextImpl addTaskCompletionListener(scala.Function1<TaskContext,scala.runtime.BoxedUnit> f)
public void addOnCompleteCallback(scala.Function0<scala.runtime.BoxedUnit> f)
public void markTaskCompleted()
public void markInterrupted()
public boolean isCompleted()
TaskContextisCompleted in class TaskContextpublic boolean isRunningLocally()
isRunningLocally in class TaskContextpublic boolean isInterrupted()
TaskContextisInterrupted in class TaskContext