Skip to content

Commit 2b7ee66

Browse files
committed
Fix bug in SizeTracking*
We were not incorporating the delta in sizes, because Seq does not match the case a :: b :: c, while List does. This was originally reported by @mateiz.
1 parent 9b9a273 commit 2b7ee66

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ private[spark] trait SizeTracker {
8080
if (samples.size > 2) {
8181
samples.remove(0)
8282
}
83-
val bytesDelta = samples.toSeq.reverse match {
83+
val bytesDelta = samples.toList.reverse match {
8484
case latest :: previous :: tail =>
8585
(latest.size - previous.size).toDouble / (latest.numUpdates - previous.numUpdates)
8686
// If fewer than 2 samples, assume no change

0 commit comments

Comments
 (0)