大家,我想问问,我在spark的程序中cogroup,调用了RangePartitioner,结果就出现如下错误:
Exception in thread "main" java.lang.ClassCastException: scala.Tuple2 cannot be cast to java.lang.Comparable
at java.util.ComparableTimSort.countRunAndMakeAscending(ComparableTimSort.java:290)
at java.util.ComparableTimSort.sort(ComparableTimSort.java:157)
at java.util.Arrays.sort(Arrays.java:537)
at java.util.TimSort.sort(TimSort.java:178)
at java.util.TimSort.sort(TimSort.java:173)
at java.util.Arrays.sort(Arrays.java:659)
at scala.collection.SeqLike$class.sorted(SeqLike.scala:615)
at scala.collection.AbstractSeq.sorted(Seq.scala:40)
at scala.collection.SeqLike$class.sortBy(SeqLike.scala:594)
at scala.collection.AbstractSeq.sortBy(Seq.scala:40)
at org.apache.spark.RangePartitioner$.determineBounds(Partitioner.scala:279)
at org.apache.spark.RangePartitioner.(Partitioner.scala:152)
at join.TestSomething.main(TestSomething.java:60)
请问有人遇到相关的问题么?怎么解决啊?