pyspark.BarrierTaskContext.cpuAmount#
- BarrierTaskContext.cpuAmount()#
The exact amount of CPUs allocated to the task. This can be fractional when
spark.task.cpusor the task resource profile requests a fractional amount (e.g. 0.5).Added in version 4.3.0.
- Returns:
- decimal.Decimal
the exact, possibly fractional amount of CPUs.
See also