xuanyuanking commented on a change in pull request #24892: [SPARK-25341][Core]
Support rolling back a shuffle map stage and re-generate the shuffle files
URL: https://github.com/apache/spark/pull/24892#discussion_r295734381
##########
File path:
common/network-shuffle/src/main/java/org/apache/spark/network/shuffle/ExternalShuffleBlockResolver.java
##########
@@ -295,19 +309,25 @@ private void deleteNonShuffleServiceServedFiles(String[]
dirs) {
* Sort-based shuffle data uses an index called
"shuffle_ShuffleId_MapId_0.index" into a data file
* called "shuffle_ShuffleId_MapId_0.data". This logic is from
IndexShuffleBlockResolver,
* and the block id format is from ShuffleDataBlockId and
ShuffleIndexBlockId.
+ * While the shuffle data and index file generated from the indeterminate
stage,
+ * the ShuffleDataBlockId and ShuffleIndexBlockId will be extended by the
stage attempt id.
*/
private ManagedBuffer getSortBasedShuffleBlockData(
- ExecutorShuffleInfo executor, int shuffleId, int mapId, int reduceId) {
+ ExecutorShuffleInfo executor, int shuffleId,
+ int mapId, int reduceId, int stageAttemptId) {
+ String baseFileName = "shuffle_" + shuffleId + "_" + mapId + "_0";
Review comment:
IIUC, it's the `IndexShuffleBlockResolver.NOOP_REDUCE_ID`, as described in
the comment
```
// No-op reduce ID used in interactions with disk store.
// The disk store currently expects puts to relate to a (map, reduce) pair,
but in the sort
// shuffle outputs for several reduces are glommed into a single file.
```
After all blocks consolidate in single file, we didn't use reduceId in the
shuffle file name, just use the offsite reading from index file to find the
block in the shuffle data file.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]