[ 
https://issues.apache.org/jira/browse/SPARK-21436?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16558013#comment-16558013
 ] 

zhengruifeng edited comment on SPARK-21436 at 7/26/18 7:37 AM:
---------------------------------------------------------------

[~holdenk] It looks like that \{{distinct}} already utilized the known 
partitioner. \{distinct} calls 
\{{color:#ffc66d}{color:#333333}combineByKeyWithClassTag} internally, and will 
avoid the shuffle if rdd's partitioner is equal to a hash partitioner with same 
#partitions.{color}
 
  
 
 Or do you mean that we need to expose some API like \{distinct(partitioner: 
Partitioner)} for other kinds of partitioners like \{RangePartitioner}?


was (Author: podongfeng):
[~holdenk] It looks like that \{distinct} already utilized the known 
partitioner. \{distinct} calls 
{{color:#ffc66d}{color:#333333}combineByKeyWithClassTag} internally, and will 
avoid the shuffle if rdd's partitioner is equal to a hash partitioner with same 
#partitions.
{color}{color}

 

{color:#ffc66d}{color:#333333}Or do you mean that we need to expose some API 
like {distinct(partitioner: {color}{color}Partitioner)} for other kinds of 
partitioners like \{RangePartitioner}?

> Take advantage of known partioner for distinct on RDDs
> ------------------------------------------------------
>
>                 Key: SPARK-21436
>                 URL: https://issues.apache.org/jira/browse/SPARK-21436
>             Project: Spark
>          Issue Type: Improvement
>          Components: Spark Core
>    Affects Versions: 2.3.0
>            Reporter: holdenk
>            Priority: Minor
>
> If we have a known partitioner we should be able to avoid the shuffle.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to