Skip to content

Commit c1b7572

Browse files
committed
Small optimization
1 parent ba7db7f commit c1b7572

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

core/src/main/scala/org/apache/spark/util/collection/ExternalSorter.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ private[spark] class ExternalSorter[K, V, C](
134134
private[this] case class SpilledFile(
135135
file: File,
136136
blockId: BlockId,
137-
serializerBatchSizes: ArrayBuffer[Long],
137+
serializerBatchSizes: Array[Long],
138138
elementsPerPartition: Array[Long])
139139
private val spills = new ArrayBuffer[SpilledFile]
140140

@@ -264,7 +264,7 @@ private[spark] class ExternalSorter[K, V, C](
264264
buffer = new SizeTrackingBuffer[((Int, K), C)]
265265
}
266266

267-
spills.append(SpilledFile(file, blockId, batchSizes, elementsPerPartition))
267+
spills.append(SpilledFile(file, blockId, batchSizes.toArray, elementsPerPartition))
268268
_memoryBytesSpilled += memorySize
269269
}
270270

0 commit comments

Comments
 (0)