Skip to content

Conversation

@zhengruifeng
Copy link
Contributor

What changes were proposed in this pull request?

add following missing APIs to references:

  • StorageLevel.MEMORY_AND_DISK_DESER
  • TaskContext.cpus
  • BarrierTaskContext.cpus

Why are the changes needed?

they were missing in Reference

Does this PR introduce any user-facing change?

Yes

How was this patch tested?

manually check, for BarrierTaskContext.cpus

In [10]: from pyspark import BarrierTaskContext

In [11]: rdd = spark.sparkContext.parallelize([1])

In [12]: rdd.barrier().mapPartitions(lambda _: [BarrierTaskContext.get().cpus()]).collect()
Out[12]: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]

@HyukjinKwon
Copy link
Member

Merged to master.

@zhengruifeng zhengruifeng deleted the py_doc_missing branch October 25, 2022 00:15
SandishKumarHN pushed a commit to SandishKumarHN/spark that referenced this pull request Dec 12, 2022
### What changes were proposed in this pull request?
add following missing APIs to references:

- StorageLevel.MEMORY_AND_DISK_DESER
- TaskContext.cpus
- BarrierTaskContext.cpus

### Why are the changes needed?
they were missing in Reference

### Does this PR introduce _any_ user-facing change?
Yes

### How was this patch tested?
manually check, for `BarrierTaskContext.cpus`

```
In [10]: from pyspark import BarrierTaskContext

In [11]: rdd = spark.sparkContext.parallelize([1])

In [12]: rdd.barrier().mapPartitions(lambda _: [BarrierTaskContext.get().cpus()]).collect()
Out[12]: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
```

Closes apache#38373 from zhengruifeng/py_doc_missing.

Authored-by: Ruifeng Zheng <[email protected]>
Signed-off-by: Hyukjin Kwon <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants