You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by pwendell <gi...@git.apache.org> on 2014/10/14 17:43:18 UTC

[GitHub] spark pull request: SPARK-3874: Provide stable TaskContext API

GitHub user pwendell opened a pull request:

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

    SPARK-3874: Provide stable TaskContext API

    This is a small number of clean-up changes on top of #2782. Closes #2782.

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

    $ git pull https://github.com/pwendell/spark pr-2782

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

    https://github.com/apache/spark/pull/2803.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 #2803
    
----
commit ef633f5e4857400c8711ee800b01016b6bd406b2
Author: Prashant Sharma <pr...@imaginea.com>
Date:   2014-10-13T12:41:11Z

    SPARK-3874, Provide stable TaskContext API

commit bbd9e057a24cd25336a806dce41b2cbd1ebc3233
Author: Prashant Sharma <pr...@imaginea.com>
Date:   2014-10-13T13:13:33Z

    adding missed out files to git.

commit 7ecc2fe712a40d73192ed9e28d8eca6d48c941f3
Author: Prashant Sharma <pr...@imaginea.com>
Date:   2014-10-14T08:30:38Z

    CR, Moved implementations to TaskContextImpl

commit facf3b1987055a60e8e22f0a7a3bdc64ce250e3f
Author: Prashant Sharma <pr...@imaginea.com>
Date:   2014-10-14T08:36:14Z

    Fixed the mima issue.

commit df261d0f41c41d0fe05c418aab46c82ff2183b7b
Author: Prashant Sharma <pr...@imaginea.com>
Date:   2014-10-14T08:42:52Z

    Josh's suggestion

commit ed551cee5a50c92d8b4793383b1403e1e64868ce
Author: Prashant Sharma <pr...@imaginea.com>
Date:   2014-10-14T08:54:24Z

    Fixed a typo

commit e10c08d44d76edf1022a63c6f8332d8430d95f36
Author: Patrick Wendell <pw...@gmail.com>
Date:   2014-10-14T15:35:46Z

    Clean-up the TaskContext API.

----


---
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-3874: Provide stable TaskContext API

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

    https://github.com/apache/spark/pull/2803#issuecomment-59446779
  
      [QA tests have started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/21826/consoleFull) for   PR 2803 at commit [`56d5b7a`](https://github.com/apache/spark/commit/56d5b7a703afb2529d969ffa0664f6c601186fb0).
     * 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-3874: Provide stable TaskContext API

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

    https://github.com/apache/spark/pull/2803#issuecomment-59161674
  
      [QA tests have started](https://amplab.cs.berkeley.edu/jenkins/job/NewSparkPullRequestBuilder/382/consoleFull) for   PR 2803 at commit [`56d5b7a`](https://github.com/apache/spark/commit/56d5b7a703afb2529d969ffa0664f6c601186fb0).
     * 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-3874: Provide stable TaskContext API

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

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


---
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-3874: Provide stable TaskContext API

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

    https://github.com/apache/spark/pull/2803#issuecomment-59092271
  
    LGTM.


---
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-3874: Provide stable TaskContext API

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

    https://github.com/apache/spark/pull/2803#discussion_r18876515
  
    --- Diff: project/MimaExcludes.scala ---
    @@ -50,7 +50,11 @@ object MimaExcludes {
                   "org.apache.spark.mllib.stat.MultivariateStatisticalSummary.normL2"),
                 // MapStatus should be private[spark]
                 ProblemFilters.exclude[IncompatibleTemplateDefProblem](
    -              "org.apache.spark.scheduler.MapStatus")
    +              "org.apache.spark.scheduler.MapStatus"),
    +            // TaskContext was promoted to Abstract class
    +            ProblemFilters.exclude[AbstractClassProblem](
    +              "org.apache.spark.TaskContext")
    --- End diff --
    
    I felt we could exclude this generally, it did not made sense to me to report these errors for classes marked developerApi or experimental. Thoughts ?


---
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-3874: Provide stable TaskContext API

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

    https://github.com/apache/spark/pull/2803#issuecomment-59166771
  
      [QA tests have finished](https://amplab.cs.berkeley.edu/jenkins/job/NewSparkPullRequestBuilder/382/consoleFull) for   PR 2803 at commit [`56d5b7a`](https://github.com/apache/spark/commit/56d5b7a703afb2529d969ffa0664f6c601186fb0).
     * This patch **fails Spark unit tests**.
     * This patch merges cleanly.
     * This patch adds the following public classes _(experimental)_:
      * `public abstract class TaskContext implements Serializable `



---
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-3874: Provide stable TaskContext API

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

    https://github.com/apache/spark/pull/2803#issuecomment-59131949
  
    Thanks @JoshRosen and @vanzin  - I've pushed a patch to address the style issues.


---
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-3874: Provide stable TaskContext API

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

    https://github.com/apache/spark/pull/2803#issuecomment-59453299
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/21826/
    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-3874: Provide stable TaskContext API

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

    https://github.com/apache/spark/pull/2803#issuecomment-59313344
  
      [QA tests have finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/21788/consoleFull) for   PR 2803 at commit [`56d5b7a`](https://github.com/apache/spark/commit/56d5b7a703afb2529d969ffa0664f6c601186fb0).
     * This patch **fails Spark unit tests**.
     * This patch merges cleanly.
     * This patch adds the following public classes _(experimental)_:
      * `public abstract class TaskContext implements Serializable `



---
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-3874: Provide stable TaskContext API

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

    https://github.com/apache/spark/pull/2803#issuecomment-59322777
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/21794/
    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-3874: Provide stable TaskContext API

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

    https://github.com/apache/spark/pull/2803#issuecomment-59446541
  
    Jenkins, 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-3874: Provide stable TaskContext API

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

    https://github.com/apache/spark/pull/2803#issuecomment-59317948
  
      [QA tests have started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/21794/consoleFull) for   PR 2803 at commit [`56d5b7a`](https://github.com/apache/spark/commit/56d5b7a703afb2529d969ffa0664f6c601186fb0).
     * 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-3874: Provide stable TaskContext API

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

    https://github.com/apache/spark/pull/2803#issuecomment-59455579
  
    Great @liancheng that seems to have done it.


---
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-3874: Provide stable TaskContext API

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

    https://github.com/apache/spark/pull/2803#issuecomment-59067280
  
    Jenkins, test this please. With these changes this LGTM.


---
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-3874: Provide stable TaskContext API

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

    https://github.com/apache/spark/pull/2803#issuecomment-59088511
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/21731/
    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-3874: Provide stable TaskContext API

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

    https://github.com/apache/spark/pull/2803#issuecomment-59081607
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/21730/
    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-3874: Provide stable TaskContext API

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

    https://github.com/apache/spark/pull/2803#issuecomment-59317650
  
    Jenkins, test this please. @liancheng - I am getting a SQL failure here that seems like it might be legitimate but I'm having trouble interpreting why it could possibly be caused by this patch - any idea?


---
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-3874: Provide stable TaskContext API

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

    https://github.com/apache/spark/pull/2803#issuecomment-59074502
  
      [QA tests have started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/21731/consoleFull) for   PR 2803 at commit [`44089ec`](https://github.com/apache/spark/commit/44089eca38c645cfd5e5c4fdb2f21947fa11db85).
     * 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-3874: Provide stable TaskContext API

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

    https://github.com/apache/spark/pull/2803#issuecomment-59136990
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/21746/
    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-3874: Provide stable TaskContext API

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

    https://github.com/apache/spark/pull/2803#issuecomment-59458952
  
    @pwendell I'm not pretty sure about that... This PR fixes the race condition, but the first Jenkins build of this PR also suffered the `spark.local.dir` clean up failure issue, which doesn't happen deterministically. It seems that the temporary directories under `/tmp` got corrupted. Maybe it's related to Jenkins environment. I observed this kind of failure pretty frequently last night (e.g. [build 21797](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/21797/console)), but now it's gone. Let's wait and see whether it happens 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-3874: Provide stable TaskContext API

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

    https://github.com/apache/spark/pull/2803#issuecomment-59088501
  
      [QA tests have finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/21731/consoleFull) for   PR 2803 at commit [`44089ec`](https://github.com/apache/spark/commit/44089eca38c645cfd5e5c4fdb2f21947fa11db85).
     * This patch **passes all tests**.
     * This patch merges cleanly.
     * This patch adds the following public classes _(experimental)_:
      * `public abstract class TaskContext implements Serializable `



---
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-3874: Provide stable TaskContext API

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

    https://github.com/apache/spark/pull/2803#issuecomment-59322774
  
      [QA tests have finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/21794/consoleFull) for   PR 2803 at commit [`56d5b7a`](https://github.com/apache/spark/commit/56d5b7a703afb2529d969ffa0664f6c601186fb0).
     * This patch **fails Spark unit tests**.
     * This patch merges cleanly.
     * This patch adds the following public classes _(experimental)_:
      * `public abstract class TaskContext implements Serializable `



---
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-3874: Provide stable TaskContext API

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

    https://github.com/apache/spark/pull/2803#issuecomment-59313348
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/21788/
    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-3874: Provide stable TaskContext API

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

    https://github.com/apache/spark/pull/2803#issuecomment-59317667
  
    Jenkins, 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-3874: Provide stable TaskContext API

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

    https://github.com/apache/spark/pull/2803#issuecomment-59453295
  
      [QA tests have finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/21826/consoleFull) for   PR 2803 at commit [`56d5b7a`](https://github.com/apache/spark/commit/56d5b7a703afb2529d969ffa0664f6c601186fb0).
     * This patch **passes all tests**.
     * This patch merges cleanly.
     * This patch adds the following public classes _(experimental)_:
      * `public abstract class TaskContext implements Serializable `



---
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-3874: Provide stable TaskContext API

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

    https://github.com/apache/spark/pull/2803#discussion_r18857975
  
    --- Diff: core/src/main/java/org/apache/spark/TaskContext.java ---
    @@ -18,131 +18,55 @@
     package org.apache.spark;
     
     import java.io.Serializable;
    -import java.util.ArrayList;
    -import java.util.Collections;
    -import java.util.List;
     
     import scala.Function0;
     import scala.Function1;
     import scala.Unit;
    -import scala.collection.JavaConversions;
     
     import org.apache.spark.annotation.DeveloperApi;
     import org.apache.spark.executor.TaskMetrics;
     import org.apache.spark.util.TaskCompletionListener;
    -import org.apache.spark.util.TaskCompletionListenerException;
     
     /**
    -* :: DeveloperApi ::
    -* Contextual information about a task which can be read or mutated during execution.
    -*/
    -@DeveloperApi
    -public class TaskContext implements Serializable {
    -
    -  private int stageId;
    -  private int partitionId;
    -  private long attemptId;
    -  private boolean runningLocally;
    -  private TaskMetrics taskMetrics;
    -
    -  /**
    -   * :: DeveloperApi ::
    -   * Contextual information about a task which can be read or mutated during execution.
    -   *
    -   * @param stageId stage id
    -   * @param partitionId index of the partition
    -   * @param attemptId the number of attempts to execute this task
    -   * @param runningLocally whether the task is running locally in the driver JVM
    -   * @param taskMetrics performance metrics of the task
    -   */
    -  @DeveloperApi
    -  public TaskContext(int stageId, int partitionId, long attemptId, boolean runningLocally,
    -                     TaskMetrics taskMetrics) {
    -    this.attemptId = attemptId;
    -    this.partitionId = partitionId;
    -    this.runningLocally = runningLocally;
    -    this.stageId = stageId;
    -    this.taskMetrics = taskMetrics;
    -  }
    -
    -  /**
    -   * :: DeveloperApi ::
    -   * Contextual information about a task which can be read or mutated during execution.
    -   *
    -   * @param stageId stage id
    -   * @param partitionId index of the partition
    -   * @param attemptId the number of attempts to execute this task
    -   * @param runningLocally whether the task is running locally in the driver JVM
    -   */
    -  @DeveloperApi
    -  public TaskContext(int stageId, int partitionId, long attemptId, boolean runningLocally) {
    -    this.attemptId = attemptId;
    -    this.partitionId = partitionId;
    -    this.runningLocally = runningLocally;
    -    this.stageId = stageId;
    -    this.taskMetrics = TaskMetrics.empty();
    -  }
    -
    + * Contextual information about a task which can be read or mutated during
    + * execution. To access the TaskContext for a running task use
    + * TaskContext.get().
    + */
    +public abstract class TaskContext implements Serializable {
       /**
    -   * :: DeveloperApi ::
    -   * Contextual information about a task which can be read or mutated during execution.
    -   *
    -   * @param stageId stage id
    -   * @param partitionId index of the partition
    -   * @param attemptId the number of attempts to execute this task
    +   * Return the currently active TaskContext. This can be called inside of
    +   * user functions to access contextual information about running tasks.
        */
    -  @DeveloperApi
    -  public TaskContext(int stageId, int partitionId, long attemptId) {
    -    this.attemptId = attemptId;
    -    this.partitionId = partitionId;
    -    this.runningLocally = false;
    -    this.stageId = stageId;
    -    this.taskMetrics = TaskMetrics.empty();
    +  public static TaskContext get() {
    +    return taskContext.get();
       }
     
       private static ThreadLocal<TaskContext> taskContext =
         new ThreadLocal<TaskContext>();
     
    -  /**
    -   * :: Internal API ::
    -   * This is spark internal API, not intended to be called from user programs.
    -   */
    -  public static void setTaskContext(TaskContext tc) {
    +  static void setTaskContext(TaskContext tc) {
         taskContext.set(tc);
       }
     
    -  public static TaskContext get() {
    -    return taskContext.get();
    -  }
    -
    -  /** :: Internal API ::  */
    -  public static void unset() {
    +  static void unset() {
         taskContext.remove();
       }
     
    -  // List of callback functions to execute when the task completes.
    -  private transient List<TaskCompletionListener> onCompleteCallbacks =
    -    new ArrayList<TaskCompletionListener>();
    -
    -  // Whether the corresponding task has been killed.
    -  private volatile boolean interrupted = false;
    -
    -  // Whether the task has completed.
    -  private volatile boolean completed = false;
    -
       /**
    -   * Checks whether the task has completed.
    +   * Whether the task has completed.
        */
    -  public boolean isCompleted() {
    -    return completed;
    -  }
    +  public abstract boolean isCompleted();
     
       /**
    -   * Checks whether the task has been killed.
    +   * Whether the task has been killed.
        */
    -  public boolean isInterrupted() {
    -    return interrupted;
    -  }
    +  public abstract boolean isInterrupted();
    +
    +  @Deprecated
    +  /** Deprecated: use isRunningLocally() */
    --- End diff --
    
    `@deprecated`?


---
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-3874: Provide stable TaskContext API

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

    https://github.com/apache/spark/pull/2803#discussion_r18857966
  
    --- Diff: core/src/main/java/org/apache/spark/TaskContext.java ---
    @@ -18,131 +18,55 @@
     package org.apache.spark;
     
     import java.io.Serializable;
    -import java.util.ArrayList;
    -import java.util.Collections;
    -import java.util.List;
     
     import scala.Function0;
     import scala.Function1;
     import scala.Unit;
    -import scala.collection.JavaConversions;
     
     import org.apache.spark.annotation.DeveloperApi;
     import org.apache.spark.executor.TaskMetrics;
     import org.apache.spark.util.TaskCompletionListener;
    -import org.apache.spark.util.TaskCompletionListenerException;
     
     /**
    -* :: DeveloperApi ::
    -* Contextual information about a task which can be read or mutated during execution.
    -*/
    -@DeveloperApi
    -public class TaskContext implements Serializable {
    -
    -  private int stageId;
    -  private int partitionId;
    -  private long attemptId;
    -  private boolean runningLocally;
    -  private TaskMetrics taskMetrics;
    -
    -  /**
    -   * :: DeveloperApi ::
    -   * Contextual information about a task which can be read or mutated during execution.
    -   *
    -   * @param stageId stage id
    -   * @param partitionId index of the partition
    -   * @param attemptId the number of attempts to execute this task
    -   * @param runningLocally whether the task is running locally in the driver JVM
    -   * @param taskMetrics performance metrics of the task
    -   */
    -  @DeveloperApi
    -  public TaskContext(int stageId, int partitionId, long attemptId, boolean runningLocally,
    -                     TaskMetrics taskMetrics) {
    -    this.attemptId = attemptId;
    -    this.partitionId = partitionId;
    -    this.runningLocally = runningLocally;
    -    this.stageId = stageId;
    -    this.taskMetrics = taskMetrics;
    -  }
    -
    -  /**
    -   * :: DeveloperApi ::
    -   * Contextual information about a task which can be read or mutated during execution.
    -   *
    -   * @param stageId stage id
    -   * @param partitionId index of the partition
    -   * @param attemptId the number of attempts to execute this task
    -   * @param runningLocally whether the task is running locally in the driver JVM
    -   */
    -  @DeveloperApi
    -  public TaskContext(int stageId, int partitionId, long attemptId, boolean runningLocally) {
    -    this.attemptId = attemptId;
    -    this.partitionId = partitionId;
    -    this.runningLocally = runningLocally;
    -    this.stageId = stageId;
    -    this.taskMetrics = TaskMetrics.empty();
    -  }
    -
    + * Contextual information about a task which can be read or mutated during
    + * execution. To access the TaskContext for a running task use
    + * TaskContext.get().
    + */
    +public abstract class TaskContext implements Serializable {
       /**
    -   * :: DeveloperApi ::
    -   * Contextual information about a task which can be read or mutated during execution.
    -   *
    -   * @param stageId stage id
    -   * @param partitionId index of the partition
    -   * @param attemptId the number of attempts to execute this task
    +   * Return the currently active TaskContext. This can be called inside of
    +   * user functions to access contextual information about running tasks.
        */
    -  @DeveloperApi
    -  public TaskContext(int stageId, int partitionId, long attemptId) {
    -    this.attemptId = attemptId;
    -    this.partitionId = partitionId;
    -    this.runningLocally = false;
    -    this.stageId = stageId;
    -    this.taskMetrics = TaskMetrics.empty();
    +  public static TaskContext get() {
    +    return taskContext.get();
       }
     
       private static ThreadLocal<TaskContext> taskContext =
         new ThreadLocal<TaskContext>();
     
    -  /**
    -   * :: Internal API ::
    -   * This is spark internal API, not intended to be called from user programs.
    -   */
    -  public static void setTaskContext(TaskContext tc) {
    +  static void setTaskContext(TaskContext tc) {
         taskContext.set(tc);
       }
     
    -  public static TaskContext get() {
    -    return taskContext.get();
    -  }
    -
    -  /** :: Internal API ::  */
    -  public static void unset() {
    +  static void unset() {
         taskContext.remove();
       }
     
    -  // List of callback functions to execute when the task completes.
    -  private transient List<TaskCompletionListener> onCompleteCallbacks =
    -    new ArrayList<TaskCompletionListener>();
    -
    -  // Whether the corresponding task has been killed.
    -  private volatile boolean interrupted = false;
    -
    -  // Whether the task has completed.
    -  private volatile boolean completed = false;
    -
       /**
    -   * Checks whether the task has completed.
    +   * Whether the task has completed.
        */
    -  public boolean isCompleted() {
    -    return completed;
    -  }
    +  public abstract boolean isCompleted();
     
       /**
    -   * Checks whether the task has been killed.
    +   * Whether the task has been killed.
        */
    -  public boolean isInterrupted() {
    -    return interrupted;
    -  }
    +  public abstract boolean isInterrupted();
    +
    +  @Deprecated
    --- End diff --
    
    super nit: add annotation after javadoc.


---
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-3874: Provide stable TaskContext API

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

    https://github.com/apache/spark/pull/2803#issuecomment-59070504
  
      [QA tests have started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/21730/consoleFull) for   PR 2803 at commit [`e10c08d`](https://github.com/apache/spark/commit/e10c08d44d76edf1022a63c6f8332d8430d95f36).
     * 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-3874: Provide stable TaskContext API

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

    https://github.com/apache/spark/pull/2803#discussion_r18847924
  
    --- Diff: project/MimaBuild.scala ---
    @@ -40,6 +40,7 @@ object MimaBuild {
           ProblemFilters.exclude[IncompatibleResultTypeProblem](fullName),
           ProblemFilters.exclude[IncompatibleMethTypeProblem](fullName),
           ProblemFilters.exclude[IncompatibleFieldTypeProblem](fullName)
    +//      ProblemFilters.exclude[AbstractClassProblem](fullName)
    --- End diff --
    
    Could we just remove this instead of commenting it out?


---
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-3874: Provide stable TaskContext API

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

    https://github.com/apache/spark/pull/2803#issuecomment-59081588
  
      [QA tests have finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/21730/consoleFull) for   PR 2803 at commit [`e10c08d`](https://github.com/apache/spark/commit/e10c08d44d76edf1022a63c6f8332d8430d95f36).
     * This patch **fails Spark unit tests**.
     * This patch merges cleanly.
     * This patch adds the following public classes _(experimental)_:
      * `public abstract class TaskContext implements Serializable `



---
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-3874: Provide stable TaskContext API

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

    https://github.com/apache/spark/pull/2803#issuecomment-59309497
  
      [QA tests have started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/21788/consoleFull) for   PR 2803 at commit [`56d5b7a`](https://github.com/apache/spark/commit/56d5b7a703afb2529d969ffa0664f6c601186fb0).
     * 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-3874: Provide stable TaskContext API

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

    https://github.com/apache/spark/pull/2803#issuecomment-59161149
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/21761/
    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-3874: Provide stable TaskContext API

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

    https://github.com/apache/spark/pull/2803#issuecomment-59309303
  
    Jenkins, 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-3874: Provide stable TaskContext API

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

    https://github.com/apache/spark/pull/2803#issuecomment-59158405
  
    Jenkins, retest 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