gaborgsomogyi commented on a change in pull request #23733:
[SPARK-26824][SS]Fix the checkpoint location and _spark_metadata when it
contains special chars
URL: https://github.com/apache/spark/pull/23733#discussion_r255881621
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/StreamExecution.scala
##########
@@ -89,8 +89,38 @@ abstract class StreamExecution(
val resolvedCheckpointRoot = {
val checkpointPath = new Path(checkpointRoot)
val fs =
checkpointPath.getFileSystem(sparkSession.sessionState.newHadoopConf())
- fs.mkdirs(checkpointPath)
- checkpointPath.makeQualified(fs.getUri,
fs.getWorkingDirectory).toUri.toString
+ if
(sparkSession.conf.get(SQLConf.STREAMING_CHECKPOINT_ESCAPED_PATH_CHECK_ENABLED)
+ && StreamExecution.containsSpecialCharsInPath(checkpointPath)) {
+ // In Spark 2.4 and earlier, the checkpoint path is escaped 3 times (3
`Path.toUri.toString`
+ // calls). If this legacy checkpoint path exists, we will throw an error
to tell the user how
+ // to migrate.
+ val legacyCheckpointDir =
+ new Path(new
Path(checkpointPath.toUri.toString).toUri.toString).toUri.toString
+ val legacyCheckpointDirExists =
+ try {
+ fs.exists(new Path(legacyCheckpointDir))
+ } catch {
+ case NonFatal(e) =>
Review comment:
Same question here.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]