java.lang.IllegalArgumentException: Comparison method violates its general contract!

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

Do you know how to solve this issue? Write a tip to help other users and build your expert profile.

Solutions on the web

via apache.org by Unknown author, 2 years ago
via github.com by Unknown author, 1 year ago
java.lang.IllegalArgumentException: Comparison method violates its general contract!
at org.apache.spark.util.collection.Sorter$SortState.mergeLo(Sorter.java:755)
at org.apache.spark.util.collection.Sorter$SortState.mergeAt(Sorter.java:493)
at org.apache.spark.util.collection.Sorter$SortState.mergeCollapse(Sorter.java:420)
at org.apache.spark.util.collection.Sorter$SortState.access$200(Sorter.java:294)
at org.apache.spark.util.collection.Sorter.sort(Sorter.java:128)
at org.apache.spark.util.collection.SizeTrackingPairBuffer.destructiveSortedIterator(SizeTrackingPairBuffer.scala:83)
at org.apache.spark.util.collection.ExternalSorter.spillToMergeableFile(ExternalSorter.scala:323)
at org.apache.spark.util.collection.ExternalSorter.spill(ExternalSorter.scala:271)
at org.apache.spark.util.collection.ExternalSorter.maybeSpill(ExternalSorter.scala:249)
at org.apache.spark.util.collection.ExternalSorter.insertAll(ExternalSorter.scala:220)
at org.apache.spark.shuffle.sort.SortShuffleWriter.write(SortShuffleWriter.scala:85)
at org.apache.spark.scheduler.ShuffleMapTask.runTask(ShuffleMapTask.scala:68)
at org.apache.spark.scheduler.ShuffleMapTask.runTask(ShuffleMapTask.scala:41)
at org.apache.spark.scheduler.Task.run(Task.scala:54)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)

Users with the same issue

You are the first who have seen this exception. Write a tip to help other users and build your expert profile.

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.