gaborgsomogyi 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_r266371048
##########
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:
> Also the "file:" scheme doesn't generally like "//".
Not sure what you mean here (agree that manual URI creation is not the most
appropriate way but considering the mentioned URI resolution this seemed the
most reasonable way).
```
scala> val cpTempDir = new Path("file://" + tempDir + "/temporary1")
cpTempDir: org.apache.hadoop.fs.Path =
file:/var/folders/t_/w90m85fn2gjb1v0c24wrfrxm0000gp/T/temporary1
```
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]