Github user mridulm commented on a diff in the pull request:
https://github.com/apache/spark/pull/17276#discussion_r108052747
--- Diff:
core/src/main/java/org/apache/spark/shuffle/sort/BypassMergeSortShuffleWriter.java
---
@@ -169,6 +173,36 @@ public void write(Iterator<Product2<K, V>> records)
throws IOException {
}
}
mapStatus = MapStatus$.MODULE$.apply(blockManager.shuffleServerId(),
partitionLengths);
+ if (mapStatus instanceof HighlyCompressedMapStatus) {
+ HighlyCompressedMapStatus hc = (HighlyCompressedMapStatus) mapStatus;
+ long underestimatedBlocksSize = 0L;
+ for (int i = 0; i < partitionLengths.length; i++) {
+ if (partitionLengths[i] > mapStatus.getSizeForBlock(i)) {
+ underestimatedBlocksSize += partitionLengths[i];
+ }
+ }
+ writeMetrics.incUnderestimatedBlocksSize(underestimatedBlocksSize);
--- End diff --
This will essentially be sum of every block above average size - how is
this supposed to be leveraged ?
For example:
1, 2, 3, 4, 5, 6 => 15
1, 2, 3, 4, 5, 10 => 15
(This ended up being a degenerate example - but in general, I am curious
what the value is for this metric).
---
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]