attilapiros commented on a change in pull request #24110: [SPARK-25341][Core]
Support rolling back a shuffle map stage and re-generate the shuffle files
URL: https://github.com/apache/spark/pull/24110#discussion_r270393790
##########
File path:
common/network-shuffle/src/main/java/org/apache/spark/network/shuffle/ExternalShuffleBlockHandler.java
##########
@@ -218,28 +218,33 @@ public ShuffleMetrics() {
private final int shuffleId;
// An array containing mapId and reduceId pairs.
private final int[] mapIdAndReduceIds;
+ private final int stageAttemptId;
ManagedBufferIterator(String appId, String execId, String[] blockIds) {
this.appId = appId;
this.execId = execId;
String[] blockId0Parts = blockIds[0].split("_");
- if (blockId0Parts.length != 4 || !blockId0Parts[0].equals("shuffle")) {
- throw new IllegalArgumentException("Unexpected shuffle block id
format: " + blockIds[0]);
- }
+ checkBlockId(blockId0Parts, blockIds, 0);
Review comment:
What about merging the two lines above into one function? It can be named
like `splitBlockId()`and its header would be a bit a bit simpler:
```java
String[] splitBlockId(String blockId)
```
This way the `index` and `blockIdParts` should not be coordinated.
----------------------------------------------------------------
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]