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

Saisai Shao commented on SPARK-2104:
------------------------------------

Ok, got it. I will try to fix this issue :)

> RangePartitioner should use user specified serializer to serialize range 
> bounds
> -------------------------------------------------------------------------------
>
>                 Key: SPARK-2104
>                 URL: https://issues.apache.org/jira/browse/SPARK-2104
>             Project: Spark
>          Issue Type: Bug
>            Reporter: Reynold Xin
>
> Otherwise it is pretty annoying to do a sort on types that are not java 
> serializable. 
> To reproduce, just set the serializer to Kryo, and run the following job:
> {code}
> class JavaNonSerializableClass extends Comparable { override def compareTo(o: 
> JavaNonSerializableClass) = 0 }
> sc.parallelize(Seq(new JavaNonSerializableClass, new 
> JavaNonSerializableClass), 2).map(x => (x,x)).sortByKey()
> {code}
> Basically the partitioner will always be serialized using Java (by the task 
> closure serializer). However, the rangeBounds variable in RangePartitioner 
> should be serialized with the user specified serializer. 



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to