Github user zsxwing commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16880#discussion_r100636660
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/StreamExecution.scala
 ---
    @@ -323,6 +329,20 @@ class StreamExecution(
             sparkSession.streams.notifyQueryTermination(StreamExecution.this)
             postEvent(
               new QueryTerminatedEvent(id, runId, 
exception.map(_.cause).map(Utils.exceptionString)))
    +
    +        // Delete the temp checkpoint only when the query didn't fail
    +        if (deleteCheckpointOnStop && exception.isEmpty) {
    +          val checkpointPath = new Path(checkpointRoot)
    +          try {
    +            val fs = 
checkpointPath.getFileSystem(sparkSession.sessionState.newHadoopConf())
    +            fs.delete(checkpointPath, true)
    +          } catch {
    +            case e: IOException =>
    --- End diff --
    
    Good point. I changed it to `NonFatal`.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to