You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by techaddict <gi...@git.apache.org> on 2016/05/03 07:56:17 UTC

[GitHub] spark pull request: Spark 15082

GitHub user techaddict opened a pull request:

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

    Spark 15082

    ## What changes were proposed in this pull request?
    Added tests for ListAccumulator and LegacyAccumulatorWrapper, test for ListAccumulator is one similar to old Collection Accumulators
    
    ## How was this patch tested?
    Ran tests locally.
    
    cc @rxin 
    


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

    $ git pull https://github.com/techaddict/spark SPARK-15082

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

    https://github.com/apache/spark/pull/12862.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 #12862
    
----
commit be933fdc2c0ef195d75e9aa66cc47d94ed964fbb
Author: Sandeep Singh <sa...@techaddict.me>
Date:   2016-05-03T07:02:47Z

    [SPARK-15082][CORE] Improve unit test coverage for AccumulatorV2

commit 29f803f14edd8d348ead78e205d7d0cdc422cc30
Author: Sandeep Singh <sa...@techaddict.me>
Date:   2016-05-03T07:04:16Z

    fix

----


---
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-15082][CORE] Improve unit test coverage...

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

    https://github.com/apache/spark/pull/12862#issuecomment-216488915
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/57614/
    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-15082][CORE] Improve unit test coverage...

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

    https://github.com/apache/spark/pull/12862#issuecomment-216488913
  
    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 pull request: [SPARK-15082][CORE] Improve unit test coverage...

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

    https://github.com/apache/spark/pull/12862#issuecomment-216471037
  
    @rxin hows it looking now ?


---
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-15082][CORE] Improve unit test coverage...

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

    https://github.com/apache/spark/pull/12862#discussion_r61848725
  
    --- Diff: core/src/test/scala/org/apache/spark/util/AccumulatorV2Suite.scala ---
    @@ -86,4 +86,48 @@ class AccumulatorV2Suite extends SparkFunSuite {
         assert(acc.sum == 5.0)
         assert(acc.avg == 1.25)
       }
    +
    +  test("ListAccumulator") {
    +    val maxI = 1000
    +    for (nThreads <- List(1, 10)) {
    --- End diff --
    
    why do we need this? can we just do some basic unit test similar to other test cases.



---
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-15082][CORE] Improve unit test coverage...

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

    https://github.com/apache/spark/pull/12862#discussion_r61851773
  
    --- Diff: core/src/test/scala/org/apache/spark/util/AccumulatorV2Suite.scala ---
    @@ -17,9 +17,9 @@
     
     package org.apache.spark.util
     
    -import org.apache.spark.{DoubleAccumulator, LongAccumulator, SparkFunSuite}
    +import org.apache.spark._
     
    -class AccumulatorV2Suite extends SparkFunSuite {
    +class AccumulatorV2Suite extends SparkFunSuite with LocalSparkContext {
    --- End diff --
    
    don't need LocalSparkContext


---
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-15082][CORE] Improve unit test coverage...

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

    https://github.com/apache/spark/pull/12862#issuecomment-216549323
  
    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 pull request: [SPARK-15082][CORE] Improve unit test coverage...

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

    https://github.com/apache/spark/pull/12862#issuecomment-216492367
  
    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 pull request: [SPARK-15082][CORE] Improve unit test coverage...

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

    https://github.com/apache/spark/pull/12862#issuecomment-216492234
  
    **[Test build #57617 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/57617/consoleFull)** for PR 12862 at commit [`0322c28`](https://github.com/apache/spark/commit/0322c2840aebd08f7c456b18e583ab83ee0e52d5).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds the following public classes _(experimental)_:
      * `class AccumulatorV2Suite extends SparkFunSuite `


---
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-15082][CORE] Improve unit test coverage...

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

    https://github.com/apache/spark/pull/12862#issuecomment-216482215
  
    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 pull request: [SPARK-15082][CORE] Improve unit test coverage...

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

    https://github.com/apache/spark/pull/12862#issuecomment-216626571
  
    Merging in master / branch-2.0. 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-15082][CORE] Improve unit test coverage...

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

    https://github.com/apache/spark/pull/12862#issuecomment-216471287
  
    **[Test build #57617 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/57617/consoleFull)** for PR 12862 at commit [`0322c28`](https://github.com/apache/spark/commit/0322c2840aebd08f7c456b18e583ab83ee0e52d5).


---
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-15082][CORE] Improve unit test coverage...

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

    https://github.com/apache/spark/pull/12862#issuecomment-216549036
  
    **[Test build #57636 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/57636/consoleFull)** for PR 12862 at commit [`493c787`](https://github.com/apache/spark/commit/493c787444c3f1df75f57b884ef6c0e2f2a7c4f6).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds the following public classes _(experimental)_:
      * `class AccumulatorV2Suite extends SparkFunSuite `


---
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-15082][CORE] Improve unit test coverage...

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

    https://github.com/apache/spark/pull/12862#issuecomment-216466924
  
    @rxin fixed 👍 


---
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-15082][CORE] Improve unit test coverage...

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

    https://github.com/apache/spark/pull/12862#issuecomment-216549327
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/57636/
    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-15082][CORE] Improve unit test coverage...

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

    https://github.com/apache/spark/pull/12862#discussion_r61934193
  
    --- Diff: core/src/test/scala/org/apache/spark/util/AccumulatorV2Suite.scala ---
    @@ -86,4 +86,63 @@ class AccumulatorV2Suite extends SparkFunSuite {
         assert(acc.sum == 5.0)
         assert(acc.avg == 1.25)
       }
    +
    +  test("ListAccumulator") {
    +    val acc = new ListAccumulator[Double]
    +    assert(acc.value.isEmpty)
    +    assert(acc.isZero)
    +
    +    acc.add(0.0)
    +    assert(acc.value.contains(0.0))
    +    assert(!acc.isZero)
    +
    +    acc.add(new java.lang.Double(1.0))
    --- End diff --
    
    we probably don't need this since ListAccumulator does not differentiate specialized vs non-specialized.
    
    but it's minor so i'm going to just merge this.



---
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-15082][CORE] Improve unit test coverage...

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

    https://github.com/apache/spark/pull/12862#issuecomment-216488780
  
    **[Test build #57614 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/57614/consoleFull)** for PR 12862 at commit [`9187737`](https://github.com/apache/spark/commit/9187737dabd93197bcef912f22856c53e5235c3d).
     * 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-15082][CORE] Improve unit test coverage...

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

    https://github.com/apache/spark/pull/12862#issuecomment-216462256
  
    **[Test build #57612 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/57612/consoleFull)** for PR 12862 at commit [`29f803f`](https://github.com/apache/spark/commit/29f803f14edd8d348ead78e205d7d0cdc422cc30).


---
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-15082][CORE] Improve unit test coverage...

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

    https://github.com/apache/spark/pull/12862#issuecomment-216492369
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/57617/
    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-15082][CORE] Improve unit test coverage...

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

    https://github.com/apache/spark/pull/12862#issuecomment-216482216
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/57612/
    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-15082][CORE] Improve unit test coverage...

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

    https://github.com/apache/spark/pull/12862#issuecomment-216482007
  
    **[Test build #57612 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/57612/consoleFull)** for PR 12862 at commit [`29f803f`](https://github.com/apache/spark/commit/29f803f14edd8d348ead78e205d7d0cdc422cc30).
     * 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-15082][CORE] Improve unit test coverage...

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

    https://github.com/apache/spark/pull/12862#issuecomment-216468183
  
    @techaddict it would be great if you can use blank lines to actually logically group things together. Right now I feel the blank lines are pretty random (e.g. no blank line before copyAndReset -- which is the beginning of something else completely).



---
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-15082][CORE] Improve unit test coverage...

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

    https://github.com/apache/spark/pull/12862#issuecomment-216516520
  
    **[Test build #57636 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/57636/consoleFull)** for PR 12862 at commit [`493c787`](https://github.com/apache/spark/commit/493c787444c3f1df75f57b884ef6c0e2f2a7c4f6).


---
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-15082][CORE] Improve unit test coverage...

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

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


---
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-15082][CORE] Improve unit test coverage...

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

    https://github.com/apache/spark/pull/12862#issuecomment-216466977
  
    **[Test build #57614 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/57614/consoleFull)** for PR 12862 at commit [`9187737`](https://github.com/apache/spark/commit/9187737dabd93197bcef912f22856c53e5235c3d).


---
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-15082][CORE] Improve unit test coverage...

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

    https://github.com/apache/spark/pull/12862#discussion_r61848671
  
    --- Diff: core/src/test/scala/org/apache/spark/util/AccumulatorV2Suite.scala ---
    @@ -86,4 +86,48 @@ class AccumulatorV2Suite extends SparkFunSuite {
         assert(acc.sum == 5.0)
         assert(acc.avg == 1.25)
       }
    +
    +  test("ListAccumulator") {
    +    val maxI = 1000
    +    for (nThreads <- List(1, 10)) {
    +      // test single & multi-threaded
    +      sc = new SparkContext("local[" + nThreads + "]", "test")
    +      val acc = sc.listAccumulator[Double]
    +      assert(acc.isZero)
    +
    +      val d = sc.parallelize((1 to maxI) ++ (1 to maxI)).map(_.toDouble)
    +      d.foreach { x => acc.add(x) }
    +
    +      assert(acc.value.size() === 2*maxI)
    +      for (i <- 1 to maxI) {
    +        assert(acc.value.contains(i.toDouble))
    +      }
    +      resetSparkContext()
    +    }
    +  }
    +
    +  test("LegacyAccumulatorWrapper") {
    +    val acc = new LegacyAccumulatorWrapper("default", AccumulatorParam.StringAccumulatorParam)
    +    assert(acc.value === "default")
    +    assert(!acc.isZero)
    +
    +    acc.add("foo")
    +    assert(acc.value === "foo")
    +    assert(!acc.isZero)
    +
    +    // test using non-specialized add function
    --- End diff --
    
    string is not primitive so i don't think there is a difference between specialized / non-specialized. you can just remove this


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