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

[GitHub] spark pull request: [SPARK-6765] Fix test code style for core.

GitHub user rxin opened a pull request:

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

    [SPARK-6765] Fix test code style for core.

    

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

    $ git pull https://github.com/rxin/spark test-style-core

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

    https://github.com/apache/spark/pull/5484.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 #5484
    
----
commit e0b0100ac09ad76f3a0514f2b88f49fc8d162ddf
Author: Reynold Xin <rx...@databricks.com>
Date:   2015-04-12T22:56:00Z

    [SPARK-6765] Fix test code style for core.

----


---
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-6765] Fix test code style for core.

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

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


---
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-6765] Fix test code style for core.

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

    https://github.com/apache/spark/pull/5484#issuecomment-92157370
  
      [Test build #30126 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/30126/consoleFull) for   PR 5484 at commit [`e0b0100`](https://github.com/apache/spark/commit/e0b0100ac09ad76f3a0514f2b88f49fc8d162ddf).
     * This patch **passes all tests**.
     * This patch merges cleanly.
     * This patch adds no public classes.
     * This patch does not change any dependencies.


---
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-6765] Fix test code style for core.

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

    https://github.com/apache/spark/pull/5484#discussion_r28210494
  
    --- Diff: core/src/test/scala/org/apache/spark/serializer/KryoSerializerSuite.scala ---
    @@ -106,7 +106,9 @@ class KryoSerializerSuite extends FunSuite with SharedSparkContext {
         check(mutable.HashMap(1 -> "one", 2 -> "two"))
         check(mutable.HashMap("one" -> 1, "two" -> 2))
         check(List(Some(mutable.HashMap(1->1, 2->2)), None, Some(mutable.HashMap(3->4))))
    -    check(List(mutable.HashMap("one" -> 1, "two" -> 2),mutable.HashMap(1->"one",2->"two",3->"three")))
    +    check(List(
    +      mutable.HashMap("one" -> 1, "two" -> 2),
    +      mutable.HashMap(1->"one",2->"two",3->"three")))
    --- End diff --
    
    don't we require more spaces around here?


---
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-6765] Fix test code style for core.

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

    https://github.com/apache/spark/pull/5484#issuecomment-92148916
  
      [Test build #30126 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/30126/consoleFull) for   PR 5484 at commit [`e0b0100`](https://github.com/apache/spark/commit/e0b0100ac09ad76f3a0514f2b88f49fc8d162ddf).


---
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-6765] Fix test code style for core.

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

    https://github.com/apache/spark/pull/5484#discussion_r28213105
  
    --- Diff: core/src/test/scala/org/apache/spark/deploy/rest/StandaloneRestSubmitSuite.scala ---
    @@ -508,7 +508,7 @@ private class DummyMaster(
         exception: Option[Exception] = None)
       extends Actor {
     
    -  override def receive = {
    +  override def receive: PartialFunction[Any, Unit] = {
    --- End diff --
    
    it will trigger the linter.


---
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-6765] Fix test code style for core.

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

    https://github.com/apache/spark/pull/5484#discussion_r28213874
  
    --- Diff: core/src/test/scala/org/apache/spark/serializer/KryoSerializerSuite.scala ---
    @@ -106,7 +106,9 @@ class KryoSerializerSuite extends FunSuite with SharedSparkContext {
         check(mutable.HashMap(1 -> "one", 2 -> "two"))
         check(mutable.HashMap("one" -> 1, "two" -> 2))
         check(List(Some(mutable.HashMap(1->1, 2->2)), None, Some(mutable.HashMap(3->4))))
    -    check(List(mutable.HashMap("one" -> 1, "two" -> 2),mutable.HashMap(1->"one",2->"two",3->"three")))
    +    check(List(
    +      mutable.HashMap("one" -> 1, "two" -> 2),
    +      mutable.HashMap(1->"one",2->"two",3->"three")))
    --- End diff --
    
    nor comma. apparently


---
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-6765] Fix test code style for core.

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

    https://github.com/apache/spark/pull/5484#discussion_r28210564
  
    --- Diff: core/src/test/scala/org/apache/spark/util/random/XORShiftRandomSuite.scala ---
    @@ -28,7 +28,7 @@ import scala.language.reflectiveCalls
     
     class XORShiftRandomSuite extends FunSuite with Matchers {
     
    -  def fixture = new {
    +  def fixture: Object {val seed: Long; val hundMil: Int; val xorRand: XORShiftRandom} = new {
    --- End diff --
    
    haha... um.


---
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-6765] Fix test code style for core.

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

    https://github.com/apache/spark/pull/5484#discussion_r28213119
  
    --- Diff: core/src/test/scala/org/apache/spark/serializer/KryoSerializerSuite.scala ---
    @@ -106,7 +106,9 @@ class KryoSerializerSuite extends FunSuite with SharedSparkContext {
         check(mutable.HashMap(1 -> "one", 2 -> "two"))
         check(mutable.HashMap("one" -> 1, "two" -> 2))
         check(List(Some(mutable.HashMap(1->1, 2->2)), None, Some(mutable.HashMap(3->4))))
    -    check(List(mutable.HashMap("one" -> 1, "two" -> 2),mutable.HashMap(1->"one",2->"two",3->"three")))
    +    check(List(
    +      mutable.HashMap("one" -> 1, "two" -> 2),
    +      mutable.HashMap(1->"one",2->"two",3->"three")))
    --- End diff --
    
    oh we do -- but there is no rule to be applied on -> ... we should fix them though (in a separate thing)


---
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-6765] Fix test code style for core.

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

    https://github.com/apache/spark/pull/5484#discussion_r28210458
  
    --- Diff: core/src/test/scala/org/apache/spark/rpc/RpcEnvSuite.scala ---
    @@ -70,7 +70,7 @@ abstract class RpcEnvSuite extends FunSuite with BeforeAndAfterAll {
         env.setupEndpoint("send-remotely", new RpcEndpoint {
           override val rpcEnv = env
     
    -      override def receive = {
    +      override def receive: PartialFunction[Any, Unit] = {
    --- End diff --
    
    these ones maybe we shouldn't change unless we want it to be canonical...


---
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-6765] Fix test code style for core.

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

    https://github.com/apache/spark/pull/5484#issuecomment-92189397
  
    Merging in master.


---
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-6765] Fix test code style for core.

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

    https://github.com/apache/spark/pull/5484#discussion_r28210527
  
    --- Diff: core/src/test/scala/org/apache/spark/util/collection/ExternalSorterSuite.scala ---
    @@ -553,10 +553,10 @@ class ExternalSorterSuite extends FunSuite with LocalSparkContext with PrivateMe
         conf.set("spark.shuffle.memoryFraction", "0.001")
         sc = new SparkContext("local-cluster[1,1,512]", "test", conf)
     
    -    def createCombiner(i: String) = ArrayBuffer[String](i)
    -    def mergeValue(buffer: ArrayBuffer[String], i: String) = buffer += i
    -    def mergeCombiners(buffer1: ArrayBuffer[String], buffer2: ArrayBuffer[String]) =
    -      buffer1 ++= buffer2
    +    def createCombiner(i: String): ArrayBuffer[String] = ArrayBuffer[String](i)
    +    def mergeValue(buffer: ArrayBuffer[String], i: String): ArrayBuffer[String] = buffer += i
    +    def mergeCombiners(buffer1: ArrayBuffer[String], buffer2: ArrayBuffer[String])
    --- End diff --
    
    maybe rename it buf1 and buf2 like below to have more consistent syntax :)


---
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-6765] Fix test code style for core.

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

    https://github.com/apache/spark/pull/5484#discussion_r28210438
  
    --- Diff: core/src/test/scala/org/apache/spark/deploy/rest/StandaloneRestSubmitSuite.scala ---
    @@ -508,7 +508,7 @@ private class DummyMaster(
         exception: Option[Exception] = None)
       extends Actor {
     
    -  override def receive = {
    +  override def receive: PartialFunction[Any, Unit] = {
    --- End diff --
    
    this one is generally OK, right? Not that it's less wrong this way, but just unnecessary.


---
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-6765] Fix test code style for core.

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

    https://github.com/apache/spark/pull/5484#discussion_r28210549
  
    --- Diff: core/src/test/scala/org/apache/spark/util/collection/ExternalSorterSuite.scala ---
    @@ -553,10 +553,10 @@ class ExternalSorterSuite extends FunSuite with LocalSparkContext with PrivateMe
         conf.set("spark.shuffle.memoryFraction", "0.001")
         sc = new SparkContext("local-cluster[1,1,512]", "test", conf)
     
    -    def createCombiner(i: String) = ArrayBuffer[String](i)
    -    def mergeValue(buffer: ArrayBuffer[String], i: String) = buffer += i
    -    def mergeCombiners(buffer1: ArrayBuffer[String], buffer2: ArrayBuffer[String]) =
    -      buffer1 ++= buffer2
    +    def createCombiner(i: String): ArrayBuffer[String] = ArrayBuffer[String](i)
    +    def mergeValue(buffer: ArrayBuffer[String], i: String): ArrayBuffer[String] = buffer += i
    +    def mergeCombiners(buffer1: ArrayBuffer[String], buffer2: ArrayBuffer[String])
    --- End diff --
    
    wait, these are Strings not Ints, we're screwed by 2 characters :(


---
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-6765] Fix test code style for core.

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

    https://github.com/apache/spark/pull/5484#issuecomment-92157374
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/30126/
    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