public class TaskContext
extends Object
implements scala.Serializable
Constructor and Description |
---|
TaskContext(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)
Add a callback function to be executed on task completion.
|
long |
attemptId() |
boolean |
completed() |
void |
executeOnCompleteCallbacks() |
boolean |
interrupted() |
int |
partitionId() |
boolean |
runningLocally() |
int |
splitId() |
int |
stageId() |
org.apache.spark.executor.TaskMetrics |
taskMetrics() |
public TaskContext(int stageId, int partitionId, long attemptId, boolean runningLocally, org.apache.spark.executor.TaskMetrics taskMetrics)
public int stageId()
public int partitionId()
public long attemptId()
public boolean runningLocally()
public org.apache.spark.executor.TaskMetrics taskMetrics()
public int splitId()
public boolean interrupted()
public boolean completed()
public void addOnCompleteCallback(scala.Function0<scala.runtime.BoxedUnit> f)
f
- Callback function.public void executeOnCompleteCallbacks()