You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "cloud-fan (via GitHub)" <gi...@apache.org> on 2023/02/02 08:35:05 UTC

[GitHub] [spark] cloud-fan commented on a diff in pull request #32361: [SPARK-35240][SS] Use CheckpointFileManager for checkpoint file manipulation

cloud-fan commented on code in PR #32361:
URL: https://github.com/apache/spark/pull/32361#discussion_r1094189892


##########
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/ResolveWriteToStream.scala:
##########
@@ -89,11 +89,12 @@ object ResolveWriteToStream extends Rule[LogicalPlan] with SQLConfHelper {
             s"""SparkSession.conf.set("${SQLConf.CHECKPOINT_LOCATION.key}", ...)""")
       }
     }
+    val fileManager = CheckpointFileManager.create(new Path(checkpointLocation), s.hadoopConf)
+
     // If offsets have already been created, we trying to resume a query.
     if (!s.recoverFromCheckpointLocation) {
       val checkpointPath = new Path(checkpointLocation, "offsets")
-      val fs = checkpointPath.getFileSystem(s.hadoopConf)
-      if (fs.exists(checkpointPath)) {
+      if (fileManager.exists(checkpointPath)) {

Review Comment:
   @viirya @HeartSaVioR do you know why `FileSystemBasedCheckpointFileManager.exists` calls `fs.getFileStatus`? It's inconsistent with the old code.



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