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

[GitHub] spark pull request: [SPARK-3897]format example code and explicit v...

GitHub user shijinkui opened a pull request:

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

    [SPARK-3897]format example code and explicit val instead of var

    

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

    $ git pull https://github.com/shijinkui/spark example_improve

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

    https://github.com/apache/spark/pull/2754.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 #2754
    
----
commit b2009bc04ed750b2ef03e76b5fdae2bffd958967
Author: 玄畅 <ji...@alibaba-inc.com>
Date:   2014-10-10T07:19:37Z

    format example code and explicit val instead of var

----


---
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-3897]format example code and explicit v...

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

    https://github.com/apache/spark/pull/2754#discussion_r18693582
  
    --- Diff: examples/src/main/scala/org/apache/spark/examples/LocalALS.scala ---
    @@ -31,9 +31,12 @@ import cern.jet.math._
      */
     object LocalALS {
       // Parameters set through command line arguments
    -  var M = 0 // Number of movies
    -  var U = 0 // Number of users
    -  var F = 0 // Number of features
    +  var M = 0
    +  // Number of movies
    --- End diff --
    
    standard usage is two line.
    code separate with annotation as fa as possible, as scala can omit semicolon, not likely java


---
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-3897]format example code and explicit v...

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

    https://github.com/apache/spark/pull/2754#discussion_r18692540
  
    --- Diff: examples/src/main/scala/org/apache/spark/examples/streaming/ActorWordCount.scala ---
    @@ -127,12 +127,12 @@ object FeederActor {
      * A sample word count program demonstrating the use of plugging in
      * Actor as Receiver
      * Usage: ActorWordCount <hostname> <port>
    - *   <hostname> and <port> describe the AkkaSystem that Spark Sample feeder is running on.
    + * <hostname> and <port> describe the AkkaSystem that Spark Sample feeder is running on.
    --- End diff --
    
    These are not helpful either. The continuation indent improves readability and is on purpose, I presume.


---
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-3897]format example code and explicit v...

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

    https://github.com/apache/spark/pull/2754#discussion_r18692509
  
    --- Diff: examples/src/main/scala/org/apache/spark/examples/LocalALS.scala ---
    @@ -31,9 +31,12 @@ import cern.jet.math._
      */
     object LocalALS {
       // Parameters set through command line arguments
    -  var M = 0 // Number of movies
    -  var U = 0 // Number of users
    -  var F = 0 // Number of features
    +  var M = 0
    +  // Number of movies
    --- End diff --
    
    This is not a good change. It makes it looks like the comment pertains to the following line. Leave it inline.


---
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-3897]format example code and explicit v...

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

    https://github.com/apache/spark/pull/2754#discussion_r18693711
  
    --- Diff: examples/src/main/scala/org/apache/spark/examples/streaming/ActorWordCount.scala ---
    @@ -127,12 +127,12 @@ object FeederActor {
      * A sample word count program demonstrating the use of plugging in
      * Actor as Receiver
      * Usage: ActorWordCount <hostname> <port>
    - *   <hostname> and <port> describe the AkkaSystem that Spark Sample feeder is running on.
    + * <hostname> and <port> describe the AkkaSystem that Spark Sample feeder is running on.
    --- End diff --
    
    agree.
    the problem is i cannot find where to set two space which line start with "<"  in intellij IDEA
    
    i think we can tolerate this less readability place
    :)


---
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-3897]format example code and explicit v...

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

    https://github.com/apache/spark/pull/2754#issuecomment-58628292
  
    this format only in example module, cannot effect the other module 
    
    our coding habit is formatting after modify by the way. if there are several difference after formatting, it will effect the current modify.


---
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-3897]format example code and explicit v...

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

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


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

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


[GitHub] spark pull request: [SPARK-3897]format example code and explicit v...

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

    https://github.com/apache/spark/pull/2754#issuecomment-58914891
  
    Hi @shijinkui,
    
    We'd like to avoid making large refactorings for style, since these changes tend to create merge-conflicts when backporting to maintenance branches and make `git blame` significantly less useful. However, we'd be open to automatic style checks if they can be enforced only for new code (see https://issues.apache.org/jira/browse/SPARK-3849 for more details).
    
    In the meantime, do you mind closing this pull request? 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-3897]format example code and explicit v...

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

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


---
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-3897]format example code and explicit v...

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

    https://github.com/apache/spark/pull/2754#issuecomment-58628485
  
    @srowen can u review the other PR #2751 


---
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-3897]format example code and explicit v...

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

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


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

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