You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/07/26 07:14:17 UTC
[GitHub] [spark] cloud-fan commented on a change in pull request #33451: [SPARK-36206][CORE] Support shuffle data corruption diagnosis via shuffle checksum
cloud-fan commented on a change in pull request #33451:
URL: https://github.com/apache/spark/pull/33451#discussion_r676346894
##########
File path: common/network-shuffle/src/main/java/org/apache/spark/network/shuffle/ExternalShuffleBlockResolver.java
##########
@@ -374,6 +379,45 @@ public int removeBlocks(String appId, String execId, String[] blockIds) {
.collect(Collectors.toMap(Pair::getKey, Pair::getValue));
}
+ /**
+ * Diagnose the possible cause of the shuffle data corruption by verify the shuffle checksums
+ */
+ public Cause diagnoseShuffleBlockCorruption(
+ String appId,
+ String execId,
+ int shuffleId,
+ long mapId,
+ int reduceId,
+ long checksumByReader) {
+ ExecutorShuffleInfo executor = executors.get(new AppExecId(appId, execId));
+ String fileName = "shuffle_" + shuffleId + "_" + mapId + "_0.checksum";
+ try {
+ // This's consistent with `IndexShuffleBlockResolver.getChecksumFile`.
+ // We firstly use `fileName` to get the location of the checksum file.
+ // Then, we use `Files.newDirectoryStream` to list all the files under the same directory
+ // with `probeFile`. Since there's only one single checksum file for a certain map task,
+ // so it's supposed to return one matched file too.
Review comment:
can we let the client side pass the checksum algorithm?
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org