Github user rxin commented on a diff in the pull request:
https://github.com/apache/spark/pull/8829#discussion_r42435040
--- Diff:
core/src/main/java/org/apache/spark/shuffle/sort/BypassMergeSortShuffleWriter.java
---
@@ -124,13 +153,19 @@ public void insertAll(Iterator<Product2<K, V>>
records) throws IOException {
for (DiskBlockObjectWriter writer : partitionWriters) {
writer.commitAndClose();
}
+
+ partitionLengths =
+ writePartitionedFile(shuffleBlockResolver.getDataFile(shuffleId,
mapId));
+ shuffleBlockResolver.writeIndexFile(shuffleId, mapId,
partitionLengths);
+ mapStatus = MapStatus$.MODULE$.apply(blockManager.shuffleServerId(),
partitionLengths);
}
- @Override
- public long[] writePartitionedFile(
- BlockId blockId,
- TaskContext context,
- File outputFile) throws IOException {
+ // Exposed for testing
+ long[] getPartitionLengths() {
+ return partitionLengths;
+ }
+
+ private long[] writePartitionedFile(File outputFile) throws IOException {
--- End diff --
can u add inline doc explaining what long[] is (in particular explain
whether its offset, or length)
---
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]