Return the currently active TaskContext.
Return the currently active TaskContext. This can be called inside of user functions to access contextual information about running tasks.
Returns the partition id of currently active TaskContext.
Returns the partition id of currently active TaskContext. It will return 0 if there is no active TaskContext for cases like local execution.
Set the thread local TaskContext.
Set the thread local TaskContext. Internal to Spark.
Unset the thread local TaskContext.
Unset the thread local TaskContext. Internal to Spark.