You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "dongjoon-hyun (via GitHub)" <gi...@apache.org> on 2023/09/11 23:32:56 UTC

[GitHub] [spark] dongjoon-hyun commented on a diff in pull request #42724: [SPARK-44915][CORE] Validate checksum of remounted PVC's shuffle data before recovery

dongjoon-hyun commented on code in PR #42724:
URL: https://github.com/apache/spark/pull/42724#discussion_r1322179496


##########
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:
   Thank you!



-- 
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