You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by rx...@apache.org on 2014/01/07 17:10:12 UTC

[4/4] git commit: Merge pull request #318 from srowen/master

Merge pull request #318 from srowen/master

Suggested small changes to Java code for slightly more standard style, encapsulation and in some cases performance

Sorry if this is too abrupt or not a welcome set of changes, but thought I'd see if I could contribute a little. I'm a Java developer and just getting seriously into Spark. So I thought I'd suggest a number of small changes to the couple Java parts of the code to make it a little tighter, more standard and even a bit faster.

Feel free to take all, some or none of this. Happy to explain any of it.


Project: http://git-wip-us.apache.org/repos/asf/incubator-spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-spark/commit/15d95345
Tree: http://git-wip-us.apache.org/repos/asf/incubator-spark/tree/15d95345
Diff: http://git-wip-us.apache.org/repos/asf/incubator-spark/diff/15d95345

Branch: refs/heads/master
Commit: 15d953450167c4ec45c9d0a2c7ab8ee71be2e576
Parents: 468af0f 4b92a20
Author: Reynold Xin <rx...@apache.org>
Authored: Tue Jan 7 08:10:02 2014 -0800
Committer: Reynold Xin <rx...@apache.org>
Committed: Tue Jan 7 08:10:02 2014 -0800

----------------------------------------------------------------------
 .../apache/spark/network/netty/FileClient.java  |  5 +-
 .../netty/FileClientChannelInitializer.java     |  2 +-
 .../apache/spark/network/netty/FileServer.java  |  8 +--
 .../netty/FileServerChannelInitializer.java     |  4 +-
 .../spark/network/netty/FileServerHandler.java  |  6 +--
 .../spark/network/netty/PathResolver.java       | 52 ++++++++++----------
 .../org/apache/spark/examples/JavaHdfsLR.java   | 29 ++++++-----
 .../org/apache/spark/examples/JavaKMeans.java   | 23 ++++++---
 .../org/apache/spark/examples/JavaLogQuery.java | 20 ++++----
 .../org/apache/spark/examples/JavaPageRank.java | 12 +++--
 .../org/apache/spark/examples/JavaSparkPi.java  | 10 ++--
 .../java/org/apache/spark/examples/JavaTC.java  | 16 +++---
 .../apache/spark/examples/JavaWordCount.java    | 10 +++-
 .../apache/spark/mllib/examples/JavaALS.java    | 18 ++++---
 .../apache/spark/mllib/examples/JavaKMeans.java | 16 +++---
 .../org/apache/spark/mllib/examples/JavaLR.java | 19 ++++---
 .../streaming/examples/JavaFlumeEventCount.java |  5 +-
 .../streaming/examples/JavaKafkaWordCount.java  | 16 ++++--
 .../examples/JavaNetworkWordCount.java          | 15 ++++--
 .../streaming/examples/JavaQueueStream.java     | 11 +++--
 20 files changed, 174 insertions(+), 123 deletions(-)
----------------------------------------------------------------------