pyspark.BarrierTaskContext.partitionId

BarrierTaskContext.partitionId() → int

The ID of the RDD partition that is computed by this task.

Returns
int

current partition id.