Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Evenly Repartioning AlignmentRecordRDD fails with IllegalArgumentException on sorted RDD #2063
Trying to repartition an AlignmentRecordRDD yields the following exception:
java.lang.IllegalArgumentException: requirement failed: Cannot evenly repartition an unsorted RDD.
This occurs even when the RDD is "sorted", as in one of the sortByReadsXxx methods or sort has just been called prior to the repartitioning.
Looking at the code, the sorting check is actually looking to see if optPartitionMap.isDefined. I was unable to figure out exactly where this property would be set, but its not in any of the sort methods, so at least this is a confusing error.