Github user mengxr commented on the pull request:
https://github.com/apache/spark/pull/4706#issuecomment-75383344
Say we have ranks 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 and two partitions. With
HashPartitioner, the mapping is
(0, 2, 4, 6, 8) -> part 0, (1, 3, 5, 7, 9) -> part 1. With the partitioning
scheme you proposed, the mapping is
(0, 1, 2, 3, 4) -> Part 0, (5, 6, 7, 8, 9) -> part 1. This will reduce the
shuffle size to part 1 but increases the the load on part 0. For a parallel
algorithm, we care more about the wall-clock time. I think it will increase the
overall time. I can also give examples that yours won't work well.
~~~
1 3 5
2 4 6
1 3 7
2 4 8
1 3 9
~~~
---
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.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]