You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by srowen <gi...@git.apache.org> on 2016/06/13 13:47:48 UTC

[GitHub] spark pull request #13642: [MINOR] Clean up several build warnings, mostly d...

GitHub user srowen opened a pull request:

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

    [MINOR] Clean up several build warnings, mostly due to internal use of old accumulators

    ## What changes were proposed in this pull request?
    
    Another PR to clean up recent build warnings. This particularly cleans up several instances of the old accumulator API usage in tests that are straightforward to update. I think this qualifies as "minor".
    
    
    ## How was this patch tested?
    
    Jenkins

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

    $ git pull https://github.com/srowen/spark BuildWarnings

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

    https://github.com/apache/spark/pull/13642.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 #13642
    
----
commit c8850d13fe13597978b48827efb2d423c42c442e
Author: Sean Owen <so...@cloudera.com>
Date:   2016-06-13T13:45:53Z

    Clean up several build warnings, mostly due to internal use of old accumulators

----


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

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


[GitHub] spark issue #13642: [MINOR] Clean up several build warnings, mostly due to i...

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

    https://github.com/apache/spark/pull/13642
  
    **[Test build #60480 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/60480/consoleFull)** for PR 13642 at commit [`20c2a6b`](https://github.com/apache/spark/commit/20c2a6b98de236e0a269a1ed5e3ad2f370c7b8e7).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


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

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


[GitHub] spark issue #13642: [MINOR] Clean up several build warnings, mostly due to i...

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

    https://github.com/apache/spark/pull/13642
  
    **[Test build #60404 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/60404/consoleFull)** for PR 13642 at commit [`c8850d1`](https://github.com/apache/spark/commit/c8850d13fe13597978b48827efb2d423c42c442e).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds the following public classes _(experimental)_:
      * `    class SetAccumulator[T] extends AccumulatorV2[T, HashSet[T]] `
      * `    case class ColumnMetrics() `


---
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 #13642: [MINOR] Clean up several build warnings, mostly d...

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

    https://github.com/apache/spark/pull/13642#discussion_r66838376
  
    --- Diff: sql/core/src/test/scala/org/apache/spark/sql/execution/metric/SQLMetricsSuite.scala ---
    @@ -49,16 +49,6 @@ class SQLMetricsSuite extends SparkFunSuite with SharedSQLContext {
         assert(boxingFinder.boxingInvokes.isEmpty, s"Found boxing: ${boxingFinder.boxingInvokes}")
       }
     
    -  test("Normal accumulator should do boxing") {
    -    // We need this test to make sure BoxingFinder works.
    -    val l = sparkContext.accumulator(0L)
    -    val f = () => { l += 1L }
    --- End diff --
    
    should we remove all the boxing test, include the `BoxingFinder`?


---
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 #13642: [MINOR] Clean up several build warnings, mostly d...

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

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


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

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


[GitHub] spark issue #13642: [MINOR] Clean up several build warnings, mostly due to i...

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

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


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

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


[GitHub] spark issue #13642: [MINOR] Clean up several build warnings, mostly due to i...

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

    https://github.com/apache/spark/pull/13642
  
    **[Test build #60480 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/60480/consoleFull)** for PR 13642 at commit [`20c2a6b`](https://github.com/apache/spark/commit/20c2a6b98de236e0a269a1ed5e3ad2f370c7b8e7).


---
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 #13642: [MINOR] Clean up several build warnings, mostly d...

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

    https://github.com/apache/spark/pull/13642#discussion_r66793744
  
    --- Diff: sql/core/src/test/scala/org/apache/spark/sql/execution/metric/SQLMetricsSuite.scala ---
    @@ -49,16 +49,6 @@ class SQLMetricsSuite extends SparkFunSuite with SharedSQLContext {
         assert(boxingFinder.boxingInvokes.isEmpty, s"Found boxing: ${boxingFinder.boxingInvokes}")
       }
     
    -  test("Normal accumulator should do boxing") {
    -    // We need this test to make sure BoxingFinder works.
    -    val l = sparkContext.accumulator(0L)
    -    val f = () => { l += 1L }
    --- End diff --
    
    This assertion is no longer true in the new LongAccumulator 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 issue #13642: [MINOR] Clean up several build warnings, mostly due to i...

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

    https://github.com/apache/spark/pull/13642
  
    I just cherry-picked this commit to 2.0 and resolved conflicts.


---
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 #13642: [MINOR] Clean up several build warnings, mostly d...

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

    https://github.com/apache/spark/pull/13642#discussion_r66928258
  
    --- Diff: sql/core/src/test/scala/org/apache/spark/sql/execution/metric/SQLMetricsSuite.scala ---
    @@ -49,16 +49,6 @@ class SQLMetricsSuite extends SparkFunSuite with SharedSQLContext {
         assert(boxingFinder.boxingInvokes.isEmpty, s"Found boxing: ${boxingFinder.boxingInvokes}")
       }
     
    -  test("Normal accumulator should do boxing") {
    -    // We need this test to make sure BoxingFinder works.
    -    val l = sparkContext.accumulator(0L)
    -    val f = () => { l += 1L }
    --- End diff --
    
    Yeah, right now it's testing that a different, custom accumulator doesn't box. It doesn't, so it succeeds. You added the test so I think you're the authority here, and if you're OK removing the test, seems OK by me.


---
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 #13642: [MINOR] Clean up several build warnings, mostly d...

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

    https://github.com/apache/spark/pull/13642#discussion_r78615382
  
    --- Diff: sql/core/src/test/scala/org/apache/spark/sql/execution/metric/SQLMetricsSuite.scala ---
    @@ -17,48 +17,18 @@
     
     package org.apache.spark.sql.execution.metric
     
    -import java.io.{ByteArrayInputStream, ByteArrayOutputStream}
    -
    -import scala.collection.mutable
    -
    -import org.apache.xbean.asm5._
    -import org.apache.xbean.asm5.Opcodes._
    -
     import org.apache.spark.SparkFunSuite
     import org.apache.spark.sql._
     import org.apache.spark.sql.execution.SparkPlanInfo
     import org.apache.spark.sql.execution.ui.SparkPlanGraph
     import org.apache.spark.sql.functions._
     import org.apache.spark.sql.internal.SQLConf
     import org.apache.spark.sql.test.SharedSQLContext
    -import org.apache.spark.util.{AccumulatorContext, JsonProtocol, Utils}
    -
    +import org.apache.spark.util.{AccumulatorContext, JsonProtocol}
     
     class SQLMetricsSuite extends SparkFunSuite with SharedSQLContext {
       import testImplicits._
     
    -  test("SQLMetric should not box Long") {
    --- End diff --
    
    > This wouldn't happen without breaking the new API,
    
    Agreed. SQLMetric is not a public API, we may add new stuff. My point is that we don't need to delete a working test that does test some behavior we want to maintain. Anyway, this seems unlikely broken in future so I agree that not need to add it back.


---
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 #13642: [MINOR] Clean up several build warnings, mostly d...

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

    https://github.com/apache/spark/pull/13642#discussion_r66844310
  
    --- Diff: sql/core/src/test/scala/org/apache/spark/sql/execution/metric/SQLMetricsSuite.scala ---
    @@ -49,16 +49,6 @@ class SQLMetricsSuite extends SparkFunSuite with SharedSQLContext {
         assert(boxingFinder.boxingInvokes.isEmpty, s"Found boxing: ${boxingFinder.boxingInvokes}")
       }
     
    -  test("Normal accumulator should do boxing") {
    -    // We need this test to make sure BoxingFinder works.
    -    val l = sparkContext.accumulator(0L)
    -    val f = () => { l += 1L }
    --- End diff --
    
    Maybe... I am not sure what the purpose of the test was. The one that remains still passes.
    BTW the old accumulator API is definitely still tested. I'm just changing tests that need an accumulator, not the old accumulator specifically. This avoids deprecation warnings.


---
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 #13642: [MINOR] Clean up several build warnings, mostly d...

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

    https://github.com/apache/spark/pull/13642#discussion_r78477976
  
    --- Diff: sql/core/src/test/scala/org/apache/spark/sql/execution/metric/SQLMetricsSuite.scala ---
    @@ -17,48 +17,18 @@
     
     package org.apache.spark.sql.execution.metric
     
    -import java.io.{ByteArrayInputStream, ByteArrayOutputStream}
    -
    -import scala.collection.mutable
    -
    -import org.apache.xbean.asm5._
    -import org.apache.xbean.asm5.Opcodes._
    -
     import org.apache.spark.SparkFunSuite
     import org.apache.spark.sql._
     import org.apache.spark.sql.execution.SparkPlanInfo
     import org.apache.spark.sql.execution.ui.SparkPlanGraph
     import org.apache.spark.sql.functions._
     import org.apache.spark.sql.internal.SQLConf
     import org.apache.spark.sql.test.SharedSQLContext
    -import org.apache.spark.util.{AccumulatorContext, JsonProtocol, Utils}
    -
    +import org.apache.spark.util.{AccumulatorContext, JsonProtocol}
     
     class SQLMetricsSuite extends SparkFunSuite with SharedSQLContext {
       import testImplicits._
     
    -  test("SQLMetric should not box Long") {
    --- End diff --
    
    @cloud-fan the test here is just making sure we won't bring boxing into SQLMetric in future.


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

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


[GitHub] spark issue #13642: [MINOR] Clean up several build warnings, mostly due to i...

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

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


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

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


[GitHub] spark issue #13642: [MINOR] Clean up several build warnings, mostly due to i...

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

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


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

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


[GitHub] spark issue #13642: [MINOR] Clean up several build warnings, mostly due to i...

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

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


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

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


[GitHub] spark issue #13642: [MINOR] Clean up several build warnings, mostly due to i...

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

    https://github.com/apache/spark/pull/13642
  
    **[Test build #60404 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/60404/consoleFull)** for PR 13642 at commit [`c8850d1`](https://github.com/apache/spark/commit/c8850d13fe13597978b48827efb2d423c42c442e).


---
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 #13642: [MINOR] Clean up several build warnings, mostly d...

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

    https://github.com/apache/spark/pull/13642#discussion_r78477612
  
    --- Diff: sql/core/src/test/scala/org/apache/spark/sql/execution/metric/SQLMetricsSuite.scala ---
    @@ -17,48 +17,18 @@
     
     package org.apache.spark.sql.execution.metric
     
    -import java.io.{ByteArrayInputStream, ByteArrayOutputStream}
    -
    -import scala.collection.mutable
    -
    -import org.apache.xbean.asm5._
    -import org.apache.xbean.asm5.Opcodes._
    -
     import org.apache.spark.SparkFunSuite
     import org.apache.spark.sql._
     import org.apache.spark.sql.execution.SparkPlanInfo
     import org.apache.spark.sql.execution.ui.SparkPlanGraph
     import org.apache.spark.sql.functions._
     import org.apache.spark.sql.internal.SQLConf
     import org.apache.spark.sql.test.SharedSQLContext
    -import org.apache.spark.util.{AccumulatorContext, JsonProtocol, Utils}
    -
    +import org.apache.spark.util.{AccumulatorContext, JsonProtocol}
     
     class SQLMetricsSuite extends SparkFunSuite with SharedSQLContext {
       import testImplicits._
     
    -  test("SQLMetric should not box Long") {
    --- End diff --
    
    This is not a problem anymore for new accumulator


---
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 #13642: [MINOR] Clean up several build warnings, mostly d...

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

    https://github.com/apache/spark/pull/13642#discussion_r66857982
  
    --- Diff: sql/core/src/test/scala/org/apache/spark/sql/execution/metric/SQLMetricsSuite.scala ---
    @@ -49,16 +49,6 @@ class SQLMetricsSuite extends SparkFunSuite with SharedSQLContext {
         assert(boxingFinder.boxingInvokes.isEmpty, s"Found boxing: ${boxingFinder.boxingInvokes}")
       }
     
    -  test("Normal accumulator should do boxing") {
    -    // We need this test to make sure BoxingFinder works.
    -    val l = sparkContext.accumulator(0L)
    -    val f = () => { l += 1L }
    --- End diff --
    
    There is no boxing in the new implementation, since LongAccumulator exposes a method that accepts a primitive long now. Of course, I could change the test to manually box it. But then that seems like it's defeating whatever purpose I can imagine for the test. Is that really the right thing to do?


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

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


[GitHub] spark issue #13642: [MINOR] Clean up several build warnings, mostly due to i...

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

    https://github.com/apache/spark/pull/13642
  
    maybe we should add a new test for old accumulators, to keep backward compatibility?


---
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 #13642: [MINOR] Clean up several build warnings, mostly d...

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

    https://github.com/apache/spark/pull/13642#discussion_r78515494
  
    --- Diff: sql/core/src/test/scala/org/apache/spark/sql/execution/metric/SQLMetricsSuite.scala ---
    @@ -17,48 +17,18 @@
     
     package org.apache.spark.sql.execution.metric
     
    -import java.io.{ByteArrayInputStream, ByteArrayOutputStream}
    -
    -import scala.collection.mutable
    -
    -import org.apache.xbean.asm5._
    -import org.apache.xbean.asm5.Opcodes._
    -
     import org.apache.spark.SparkFunSuite
     import org.apache.spark.sql._
     import org.apache.spark.sql.execution.SparkPlanInfo
     import org.apache.spark.sql.execution.ui.SparkPlanGraph
     import org.apache.spark.sql.functions._
     import org.apache.spark.sql.internal.SQLConf
     import org.apache.spark.sql.test.SharedSQLContext
    -import org.apache.spark.util.{AccumulatorContext, JsonProtocol, Utils}
    -
    +import org.apache.spark.util.{AccumulatorContext, JsonProtocol}
     
     class SQLMetricsSuite extends SparkFunSuite with SharedSQLContext {
       import testImplicits._
     
    -  test("SQLMetric should not box Long") {
    --- End diff --
    
    Yeah, that was my logic. This wouldn't happen without breaking the new API, so it didn't seem worth testing for. Or: there are a million things of that form we could test for but don't.


---
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 #13642: [MINOR] Clean up several build warnings, mostly d...

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

    https://github.com/apache/spark/pull/13642#discussion_r66858454
  
    --- Diff: sql/core/src/test/scala/org/apache/spark/sql/execution/metric/SQLMetricsSuite.scala ---
    @@ -49,16 +49,6 @@ class SQLMetricsSuite extends SparkFunSuite with SharedSQLContext {
         assert(boxingFinder.boxingInvokes.isEmpty, s"Found boxing: ${boxingFinder.boxingInvokes}")
       }
     
    -  test("Normal accumulator should do boxing") {
    -    // We need this test to make sure BoxingFinder works.
    -    val l = sparkContext.accumulator(0L)
    -    val f = () => { l += 1L }
    --- End diff --
    
    hmmm, since boxing is not a problem for the new accumulator anymore, maybe we can just remove all these tests? It's weird if we only remove one of them.


---
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 #13642: [MINOR] Clean up several build warnings, mostly d...

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

    https://github.com/apache/spark/pull/13642#discussion_r78450919
  
    --- Diff: sql/core/src/test/scala/org/apache/spark/sql/execution/metric/SQLMetricsSuite.scala ---
    @@ -17,48 +17,18 @@
     
     package org.apache.spark.sql.execution.metric
     
    -import java.io.{ByteArrayInputStream, ByteArrayOutputStream}
    -
    -import scala.collection.mutable
    -
    -import org.apache.xbean.asm5._
    -import org.apache.xbean.asm5.Opcodes._
    -
     import org.apache.spark.SparkFunSuite
     import org.apache.spark.sql._
     import org.apache.spark.sql.execution.SparkPlanInfo
     import org.apache.spark.sql.execution.ui.SparkPlanGraph
     import org.apache.spark.sql.functions._
     import org.apache.spark.sql.internal.SQLConf
     import org.apache.spark.sql.test.SharedSQLContext
    -import org.apache.spark.util.{AccumulatorContext, JsonProtocol, Utils}
    -
    +import org.apache.spark.util.{AccumulatorContext, JsonProtocol}
     
     class SQLMetricsSuite extends SparkFunSuite with SharedSQLContext {
       import testImplicits._
     
    -  test("SQLMetric should not box Long") {
    --- End diff --
    
    Why remove this test? This test doesn't use the old accumulator 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 #13642: [MINOR] Clean up several build warnings, mostly d...

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

    https://github.com/apache/spark/pull/13642#discussion_r66857695
  
    --- Diff: sql/core/src/test/scala/org/apache/spark/sql/execution/metric/SQLMetricsSuite.scala ---
    @@ -49,16 +49,6 @@ class SQLMetricsSuite extends SparkFunSuite with SharedSQLContext {
         assert(boxingFinder.boxingInvokes.isEmpty, s"Found boxing: ${boxingFinder.boxingInvokes}")
       }
     
    -  test("Normal accumulator should do boxing") {
    -    // We need this test to make sure BoxingFinder works.
    -    val l = sparkContext.accumulator(0L)
    -    val f = () => { l += 1L }
    --- End diff --
    
    Then we should still keep this test, which is actually testing the `BoxingFinder`.


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

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


[GitHub] spark issue #13642: [MINOR] Clean up several build warnings, mostly due to i...

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

    https://github.com/apache/spark/pull/13642
  
    thanks, merging to master!
    
    @srowen , this PR conflicts with branch 2.0, can you send a new PR against 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