You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by zsxwing <gi...@git.apache.org> on 2017/02/10 04:03:48 UTC

[GitHub] spark pull request #16880: [SPARK-19542][SS]Delete the temp checkpoint if a ...

GitHub user zsxwing opened a pull request:

    https://github.com/apache/spark/pull/16880

    [SPARK-19542][SS]Delete the temp checkpoint if a query is stopped without errors

    ## What changes were proposed in this pull request?
    
    When a query uses a temp checkpoint dir, it's better to delete it if it's stopped without errors.
    
    ## How was this patch tested?
    
    New unit tests.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/zsxwing/spark delete-temp-checkpoint

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/16880.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #16880
    
----
commit 22e02b9ab45e453616072c69bea856874708618f
Author: Shixiong Zhu <sh...@databricks.com>
Date:   2017-02-10T02:32:16Z

    Delete the temp checkpoint if a query is stopped without errors

----


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request #16880: [SPARK-19542][SS]Delete the temp checkpoint if a ...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/spark/pull/16880


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16880: [SPARK-19542][SS]Delete the temp checkpoint if a query i...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/16880
  
    **[Test build #72721 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/72721/testReport)** for PR 16880 at commit [`cae981f`](https://github.com/apache/spark/commit/cae981f1ab9ee6f3d0d3cd4b53ccf6431551a0c0).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16880: [SPARK-19542][SS]Delete the temp checkpoint if a query i...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/16880
  
    **[Test build #72721 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/72721/testReport)** for PR 16880 at commit [`cae981f`](https://github.com/apache/spark/commit/cae981f1ab9ee6f3d0d3cd4b53ccf6431551a0c0).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16880: [SPARK-19542][SS]Delete the temp checkpoint if a query i...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/16880
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/72682/
    Test PASSed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request #16880: [SPARK-19542][SS]Delete the temp checkpoint if a ...

Posted by brkyvz <gi...@git.apache.org>.
Github user brkyvz commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16880#discussion_r100589960
  
    --- 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 --
    
    I don't think so, but can we get any other exception here? It could be bad if it bubbles up to an uncaught exception handler.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16880: [SPARK-19542][SS]Delete the temp checkpoint if a query i...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/16880
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/72721/
    Test PASSed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16880: [SPARK-19542][SS]Delete the temp checkpoint if a query i...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/16880
  
    Merged build finished. Test PASSed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16880: [SPARK-19542][SS]Delete the temp checkpoint if a query i...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/16880
  
    **[Test build #72680 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/72680/testReport)** for PR 16880 at commit [`22e02b9`](https://github.com/apache/spark/commit/22e02b9ab45e453616072c69bea856874708618f).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16880: [SPARK-19542][SS]Delete the temp checkpoint if a query i...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/16880
  
    Merged build finished. Test PASSed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16880: [SPARK-19542][SS]Delete the temp checkpoint if a query i...

Posted by brkyvz <gi...@git.apache.org>.
Github user brkyvz commented on the issue:

    https://github.com/apache/spark/pull/16880
  
    LGTM! Merging to master and 2.1.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16880: [SPARK-19542][SS]Delete the temp checkpoint if a query i...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/16880
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/72680/
    Test PASSed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16880: [SPARK-19542][SS]Delete the temp checkpoint if a query i...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/16880
  
    **[Test build #72682 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/72682/testReport)** for PR 16880 at commit [`e5fa7d7`](https://github.com/apache/spark/commit/e5fa7d76669a9a61326e032d48dec6df0d91d9c5).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16880: [SPARK-19542][SS]Delete the temp checkpoint if a query i...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/16880
  
    **[Test build #72682 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/72682/testReport)** for PR 16880 at commit [`e5fa7d7`](https://github.com/apache/spark/commit/e5fa7d76669a9a61326e032d48dec6df0d91d9c5).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16880: [SPARK-19542][SS]Delete the temp checkpoint if a query i...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/16880
  
    Merged build finished. Test PASSed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16880: [SPARK-19542][SS]Delete the temp checkpoint if a query i...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/16880
  
    **[Test build #72680 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/72680/testReport)** for PR 16880 at commit [`22e02b9`](https://github.com/apache/spark/commit/22e02b9ab45e453616072c69bea856874708618f).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request #16880: [SPARK-19542][SS]Delete the temp checkpoint if a ...

Posted by zsxwing <gi...@git.apache.org>.
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16880: [SPARK-19542][SS]Delete the temp checkpoint if a query i...

Posted by brkyvz <gi...@git.apache.org>.
Github user brkyvz commented on the issue:

    https://github.com/apache/spark/pull/16880
  
    LGTM. I left one question, but then checked and found the answer.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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