Skip to content

Commit

Permalink
fix ut in spark-2.4
Browse files Browse the repository at this point in the history
  • Loading branch information
jiang13021 committed Nov 16, 2024
1 parent 04bd2a4 commit 063142e
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,11 @@ class PushMergedDataHardSplitSuite extends AnyFunSuite
val partitionLocationMap =
shuffleClient.getPartitionLocation(SHUFFLE_ID, MAP_NUM, PARTITION_NUM)
val worker2PartitionIds = mutable.Map.empty[WorkerInfo, ArrayBuffer[Int]]
partitionLocationMap.forEach {
(partitionId, partitionLocation) =>
worker2PartitionIds
.getOrElseUpdate(partitionLocation.getWorker, ArrayBuffer.empty)
.append(partitionId)
for (partitionId <- 0 until PARTITION_NUM) {
val partitionLocation = partitionLocationMap.get(partitionId)
worker2PartitionIds
.getOrElseUpdate(partitionLocation.getWorker, ArrayBuffer.empty)
.append(partitionId)
}
val partitions = worker2PartitionIds.values.filter(_.size >= 2).head
assert(partitions.length >= 2)
Expand Down

0 comments on commit 063142e

Please sign in to comment.