GitHub user mengxr opened a pull request:
https://github.com/apache/spark/pull/1526
[SPARK-2617] Correct doc and usages of preservesPartitioning
The name `preservesPartitioning` is ambiguous: 1) preserves the indices of
partitions, 2) preserves the partitioner. The latter is correct and
`preservesPartitioning` should really be called `preservesPartitioner` to avoid
confusion. Unfortunately, this is already part of the API and we cannot change.
We should be clear in the doc and fix wrong usages.
This PR
1. adds notes in `maPartitions*`,
2. makes `RDD.sample` preserve partitioner,
3. changes `preservesPartitioning` to false in `RDD.zip` because the keys
of the first RDD are no longer the keys of the zipped RDD,
4. fixes some wrong usages in MLlib.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/mengxr/spark preserve-partitioner
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/1526.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #1526
----
commit d1caa65c7440cb92aed40dcab4b95c03389350c4
Author: Xiangrui Meng <[email protected]>
Date: 2014-07-22T09:15:44Z
add doc to explain preservesPartitioning
fix wrong usage of preservesPartitioning
make sample preserse partitioning
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---