Github user gatorsmile commented on a diff in the pull request:
https://github.com/apache/spark/pull/18861#discussion_r131571449
--- Diff: core/src/test/scala/org/apache/spark/rdd/RDDSuite.scala ---
@@ -1185,23 +1194,21 @@ class SizeBasedCoalescer(val maxSize: Int) extends
PartitionCoalescer with Seria
totalSum += splitSize
}
- while (index < partitions.size) {
+ while (index < partitions.length) {
val partition = partitions(index)
- val fileSplit =
-
partition.asInstanceOf[HadoopPartition].inputSplit.value.asInstanceOf[FileSplit]
- val splitSize = fileSplit.getLength
+ val splitSize = getPartitionSize(partition)
if (currentSum + splitSize < maxSize) {
addPartition(partition, splitSize)
index += 1
- if (index == partitions.size) {
- updateGroups
+ if (index == partitions.length) {
+ updateGroups()
}
} else {
- if (currentGroup.partitions.size == 0) {
+ if (currentGroup.partitions.isEmpty) {
addPartition(partition, splitSize)
index += 1
} else {
- updateGroups
+ updateGroups()
--- End diff --
I am fine about this, but it might confuse the others. Maybe just remove
them in this PR? You can submit a separate PR later.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]