You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "viirya (via GitHub)" <gi...@apache.org> on 2023/09/11 23:25:20 UTC
[GitHub] [spark] viirya commented on a diff in pull request #42724: [SPARK-44915][CORE] Validate checksum of remounted PVC's shuffle data before recovery
viirya commented on code in PR #42724:
URL: https://github.com/apache/spark/pull/42724#discussion_r1322175867
##########
resource-managers/kubernetes/core/src/main/scala/org/apache/spark/shuffle/KubernetesLocalDiskShuffleExecutorComponents.scala:
##########
@@ -114,5 +139,32 @@ object KubernetesLocalDiskShuffleExecutorComponents extends Logging {
}
}
}
+
+ def verifyChecksum(
+ algorithm: String,
+ blockId: BlockId,
+ checksumFile: File,
+ indexFile: File,
+ dataFile: File): Boolean = {
+ blockId match {
+ case _: ShuffleDataBlockId =>
+ if (dataFile == null || !dataFile.exists()) {
+ false // Fail because the data file file doesn't exist.
Review Comment:
```suggestion
false // Fail because the data file doesn't exist.
```
--
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