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 2019/02/25 19:39:09 UTC

[GitHub] arunmahadevan commented on a change in pull request #23764: [SPARK-26825][SS] Fix temp checkpoint creation in cluster mode when default filesystem is not local.

arunmahadevan commented on a change in pull request #23764: [SPARK-26825][SS] Fix temp checkpoint creation in cluster mode when default filesystem is not local.
URL: https://github.com/apache/spark/pull/23764#discussion_r259982130
 
 

 ##########
 File path: sql/core/src/main/scala/org/apache/spark/sql/streaming/StreamingQueryManager.scala
 ##########
 @@ -222,12 +222,14 @@ class StreamingQueryManager private[sql] (sparkSession: SparkSession) extends Lo
     }.getOrElse {
       if (useTempCheckpointLocation) {
         deleteCheckpointOnStop = true
-        val tempDir = Utils.createTempDir(namePrefix = s"temporary").getCanonicalPath
+        val tempDir = System.getProperty("java.io.tmpdir")
+        val cpTempDir = new Path("file://" + tempDir + "/temporary-"
+          + UUID.randomUUID.toString).toString
 
 Review comment:
   I dont think this handles cleaning up the tmp directory on shutdown which is already handled in `Utils.createTempDir`. I assume here we want the checkpoint location to be on the local file system and not in HDFS, so why not just re-use the Utils.createTempDir and just prefix "file://" to the canonical path to fix the issues with resolution.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org