You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by x1- <gi...@git.apache.org> on 2015/02/04 01:11:18 UTC

[GitHub] spark pull request: [SPARK-5460][MLlib] Wrapped `Try` around `dele...

GitHub user x1- opened a pull request:

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

    [SPARK-5460][MLlib] Wrapped `Try` around `deleteAllCheckpoints` - RandomForest.

    Because `deleteAllCheckpoints` has IOException potential.
    fix issue.

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

    $ git pull https://github.com/x1-/spark SPARK-5460

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

    https://github.com/apache/spark/pull/4347.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 #4347
    
----
commit 15725763b838a14bbb291ad6fc87e42fec52fb95
Author: x1- <vi...@gmail.com>
Date:   2015-02-03T10:39:30Z

    Wrapped `Try` around `deleteAllCheckpoints` - RandomForest.
    
    Because `deleteAllCheckpoints` has IOException potential.

----


---
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: [SPARK-5460][MLlib] Wrapped `Try` around `dele...

Posted by mengxr <gi...@git.apache.org>.
Github user mengxr commented on the pull request:

    https://github.com/apache/spark/pull/4347#issuecomment-73149173
  
    LGTM. Merged into master and branch-1.3. Thanks!


---
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: [SPARK-5460][MLlib] Wrapped `Try` around `dele...

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

    https://github.com/apache/spark/pull/4347#discussion_r24109644
  
    --- Diff: mllib/src/main/scala/org/apache/spark/mllib/tree/RandomForest.scala ---
    @@ -244,7 +245,10 @@ private class RandomForest (
     
         // Delete any remaining checkpoints used for node Id cache.
         if (nodeIdCache.nonEmpty) {
    -      nodeIdCache.get.deleteAllCheckpoints()
    +      Try(nodeIdCache.get.deleteAllCheckpoints()) match {
    +        case Failure(e) => logWarning(s"delete all chackpoints failed. Error reason: ${e.getMessage}")
    --- End diff --
    
    line too wide. Move logWarning to the next line.
    
    Btw, I don't see how `Try` is useful here. Maybe we should just use
    
    ~~~
    try {
      ...
    } catch {
      case ...
      case ...
    }
    ~~~
    
    Java users would feel familiar with the code.


---
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: [SPARK-5460][MLlib] Wrapped `Try` around `dele...

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

    https://github.com/apache/spark/pull/4347#issuecomment-72764883
  
    Can one of the admins verify this patch?


---
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: [SPARK-5460][MLlib] Wrapped `Try` around `dele...

Posted by mengxr <gi...@git.apache.org>.
Github user mengxr commented on the pull request:

    https://github.com/apache/spark/pull/4347#issuecomment-72911121
  
    ok to test


---
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: [SPARK-5460][MLlib] Wrapped `Try` around `dele...

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

    https://github.com/apache/spark/pull/4347#discussion_r24156610
  
    --- Diff: mllib/src/main/scala/org/apache/spark/mllib/tree/RandomForest.scala ---
    @@ -244,7 +245,10 @@ private class RandomForest (
     
         // Delete any remaining checkpoints used for node Id cache.
         if (nodeIdCache.nonEmpty) {
    -      nodeIdCache.get.deleteAllCheckpoints()
    +      Try(nodeIdCache.get.deleteAllCheckpoints()) match {
    +        case Failure(e) => logWarning(s"delete all chackpoints failed. Error reason: ${e.getMessage}")
    --- End diff --
    
    @mengxr 
    Thank you :exclamation: and I see that.
    So, change and push the code.


---
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: [SPARK-5460][MLlib] Wrapped `Try` around `dele...

Posted by x1- <gi...@git.apache.org>.
Github user x1- commented on the pull request:

    https://github.com/apache/spark/pull/4347#issuecomment-73165982
  
    @mengxr 
    Thank you very much :tada: 


---
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: [SPARK-5460][MLlib] Wrapped `Try` around `dele...

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

    https://github.com/apache/spark/pull/4347#issuecomment-72911905
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/26767/
    Test FAILed.


---
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: [SPARK-5460][MLlib] Wrapped `Try` around `dele...

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

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


---
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: [SPARK-5460][MLlib] Wrapped `Try` around `dele...

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

    https://github.com/apache/spark/pull/4347#issuecomment-73009125
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/26832/
    Test FAILed.


---
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: [SPARK-5460][MLlib] Wrapped `Try` around `dele...

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

    https://github.com/apache/spark/pull/4347#issuecomment-73009123
  
      [Test build #26832 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/26832/consoleFull) for   PR 4347 at commit [`cdd3fa2`](https://github.com/apache/spark/commit/cdd3fa2d02bde1ebaccc5543c00eab393a5f178b).
     * This patch **fails to build**.
     * 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 pull request: [SPARK-5460][MLlib] Wrapped `Try` around `dele...

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

    https://github.com/apache/spark/pull/4347#issuecomment-73021927
  
      [Test build #26835 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/26835/consoleFull) for   PR 4347 at commit [`7a3d8de`](https://github.com/apache/spark/commit/7a3d8decdad4f9cb1c481d79ed81d4dea1b6c10d).
     * 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 pull request: [SPARK-5460][MLlib] Wrapped `Try` around `dele...

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

    https://github.com/apache/spark/pull/4347#discussion_r24060636
  
    --- Diff: mllib/src/main/scala/org/apache/spark/mllib/tree/RandomForest.scala ---
    @@ -244,7 +245,10 @@ private class RandomForest (
     
         // Delete any remaining checkpoints used for node Id cache.
         if (nodeIdCache.nonEmpty) {
    -      nodeIdCache.get.deleteAllCheckpoints()
    +      Try(nodeIdCache.get.deleteAllCheckpoints()) match {
    +        case Failure(e) => logWarning(s"delete all chackpoints faild. Error reason: ${e.getMessage}")
    --- End diff --
    
    @srowen 
    Thank you very much for indicating the typo.
    Now, I modified typo and push again.


---
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: [SPARK-5460][MLlib] Wrapped `Try` around `dele...

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

    https://github.com/apache/spark/pull/4347#issuecomment-73021940
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/26835/
    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: [SPARK-5460][MLlib] Wrapped `Try` around `dele...

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

    https://github.com/apache/spark/pull/4347#issuecomment-72911900
  
      [Test build #26767 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/26767/consoleFull) for   PR 4347 at commit [`3a52745`](https://github.com/apache/spark/commit/3a52745d7204b8f317ce193e6331bd4e5a517f46).
     * This patch **fails Scala style 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 pull request: [SPARK-5460][MLlib] Wrapped `Try` around `dele...

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

    https://github.com/apache/spark/pull/4347#issuecomment-73013333
  
      [Test build #26835 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/26835/consoleFull) for   PR 4347 at commit [`7a3d8de`](https://github.com/apache/spark/commit/7a3d8decdad4f9cb1c481d79ed81d4dea1b6c10d).
     * This patch merges cleanly.


---
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: [SPARK-5460][MLlib] Wrapped `Try` around `dele...

Posted by x1- <gi...@git.apache.org>.
Github user x1- commented on the pull request:

    https://github.com/apache/spark/pull/4347#issuecomment-73013008
  
    test this please


---
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: [SPARK-5460][MLlib] Wrapped `Try` around `dele...

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

    https://github.com/apache/spark/pull/4347#issuecomment-73008387
  
      [Test build #26832 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/26832/consoleFull) for   PR 4347 at commit [`cdd3fa2`](https://github.com/apache/spark/commit/cdd3fa2d02bde1ebaccc5543c00eab393a5f178b).
     * This patch merges cleanly.


---
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: [SPARK-5460][MLlib] Wrapped `Try` around `dele...

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

    https://github.com/apache/spark/pull/4347#discussion_r24053119
  
    --- Diff: mllib/src/main/scala/org/apache/spark/mllib/tree/RandomForest.scala ---
    @@ -244,7 +245,10 @@ private class RandomForest (
     
         // Delete any remaining checkpoints used for node Id cache.
         if (nodeIdCache.nonEmpty) {
    -      nodeIdCache.get.deleteAllCheckpoints()
    +      Try(nodeIdCache.get.deleteAllCheckpoints()) match {
    +        case Failure(e) => logWarning(s"delete all chackpoints faild. Error reason: ${e.getMessage}")
    --- End diff --
    
    This has a typo ("faild"). Are you sure you want to continue in this case?


---
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: [SPARK-5460][MLlib] Wrapped `Try` around `dele...

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

    https://github.com/apache/spark/pull/4347#issuecomment-72911724
  
      [Test build #26767 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/26767/consoleFull) for   PR 4347 at commit [`3a52745`](https://github.com/apache/spark/commit/3a52745d7204b8f317ce193e6331bd4e5a517f46).
     * This patch merges cleanly.


---
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