[ https://issues.apache.org/jira/browse/SPARK-2104?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14045519#comment-14045519 ]
Saisai Shao commented on SPARK-2104: ------------------------------------ Hi Reynold, thanks a lot for your code. At first glance seems it is quite OK for the problem you mentioned, I'm not sure is there any hiding corners I missed? > 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)