Skip to content

Commit

Permalink
Make TaskSchedulerImpl deterministic
Browse files Browse the repository at this point in the history
  • Loading branch information
kotlovs committed Nov 12, 2024
1 parent db76295 commit c53afed
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -801,7 +801,7 @@ private[spark] class TaskSchedulerImpl(
* overriding in tests, so it can be deterministic.
*/
protected def shuffleOffers(offers: IndexedSeq[WorkerOffer]): IndexedSeq[WorkerOffer] = {
Random.shuffle(offers)
offers.sortBy(_.executorId) // Random.shuffle(offers)
}

def statusUpdate(tid: Long, state: TaskState, serializedData: ByteBuffer): Unit = {
Expand Down

0 comments on commit c53afed

Please sign in to comment.