TaskContext.
stageId
The ID of the stage that this task belong to.
current stage id.
previous
pyspark.TaskContext.resources
next
pyspark.TaskContext.taskAttemptId