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, get
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
initializeIfNecessary, initializeLogging, isTraceEnabled, log_, log, logDebug, logDebug, logError, logError, logInfo, logInfo, logName, logTrace, logTrace, logWarning, logWarning
public TaskContextImpl(int stageId, int partitionId, long attemptId, boolean runningLocally, org.apache.spark.executor.TaskMetrics taskMetrics)
public int stageId()
stageId
in class TaskContext
public int partitionId()
partitionId
in class TaskContext
public long attemptId()
attemptId
in class TaskContext
public boolean runningLocally()
runningLocally
in class TaskContext
public org.apache.spark.executor.TaskMetrics taskMetrics()
TaskContext
taskMetrics
in class TaskContext
public TaskContextImpl addTaskCompletionListener(TaskCompletionListener listener)
TaskContext
addTaskCompletionListener
in class TaskContext
public 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()
TaskContext
isCompleted
in class TaskContext
public boolean isRunningLocally()
isRunningLocally
in class TaskContext
public boolean isInterrupted()
TaskContext
isInterrupted
in class TaskContext