From 5caae766818a5d715eb9f1b816295c2bc0c42ef3 Mon Sep 17 00:00:00 2001 From: Jacky Li Date: Fri, 6 Mar 2015 01:14:57 +0800 Subject: [PATCH 1/5] remove import and modify usage --- .../spark/examples/graphx/LiveJournalPageRank.scala | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/examples/src/main/scala/org/apache/spark/examples/graphx/LiveJournalPageRank.scala b/examples/src/main/scala/org/apache/spark/examples/graphx/LiveJournalPageRank.scala index e809a65b79975..868086f93fbcf 100644 --- a/examples/src/main/scala/org/apache/spark/examples/graphx/LiveJournalPageRank.scala +++ b/examples/src/main/scala/org/apache/spark/examples/graphx/LiveJournalPageRank.scala @@ -17,11 +17,6 @@ package org.apache.spark.examples.graphx -import org.apache.spark.SparkContext._ -import org.apache.spark._ -import org.apache.spark.graphx._ - - /** * Uses GraphX to run PageRank on a LiveJournal social network graph. Download the dataset from * http://snap.stanford.edu/data/soc-LiveJournal1.html. @@ -30,14 +25,12 @@ object LiveJournalPageRank { def main(args: Array[String]) { if (args.length < 1) { System.err.println( - "Usage: LiveJournalPageRank \n" + + "Usage: LiveJournalPageRank --numEPart=\n" + " [--tol=]\n" + " The tolerance allowed at convergence (smaller => more accurate). Default is " + "0.001.\n" + " [--output=]\n" + " If specified, the file to write the ranks to.\n" + - " [--numEPart=]\n" + - " The number of partitions for the graph's edge RDD. Default is 4.\n" + " [--partStrategy=RandomVertexCut | EdgePartition1D | EdgePartition2D | " + "CanonicalRandomVertexCut]\n" + " The way edges are assigned to edge partitions. Default is RandomVertexCut.") From 87be83bd2e7680d146800f127809e7441db8e8a4 Mon Sep 17 00:00:00 2001 From: Jacky Li Date: Fri, 6 Mar 2015 08:18:21 +0800 Subject: [PATCH 2/5] remove default value description --- .../org/apache/spark/examples/graphx/LiveJournalPageRank.scala | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/src/main/scala/org/apache/spark/examples/graphx/LiveJournalPageRank.scala b/examples/src/main/scala/org/apache/spark/examples/graphx/LiveJournalPageRank.scala index 868086f93fbcf..c6d509b044949 100644 --- a/examples/src/main/scala/org/apache/spark/examples/graphx/LiveJournalPageRank.scala +++ b/examples/src/main/scala/org/apache/spark/examples/graphx/LiveJournalPageRank.scala @@ -31,6 +31,8 @@ object LiveJournalPageRank { "0.001.\n" + " [--output=]\n" + " If specified, the file to write the ranks to.\n" + + " [--numEPart=]\n" + + " The number of partitions for the graph's edge RDD.\n" + " [--partStrategy=RandomVertexCut | EdgePartition1D | EdgePartition2D | " + "CanonicalRandomVertexCut]\n" + " The way edges are assigned to edge partitions. Default is RandomVertexCut.") From b6235e68b74dc0807d33b29bcfdbcc4bfce30b40 Mon Sep 17 00:00:00 2001 From: Jacky Li Date: Sun, 8 Mar 2015 02:08:13 +0800 Subject: [PATCH 3/5] fix for comment --- .../apache/spark/examples/graphx/LiveJournalPageRank.scala | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/src/main/scala/org/apache/spark/examples/graphx/LiveJournalPageRank.scala b/examples/src/main/scala/org/apache/spark/examples/graphx/LiveJournalPageRank.scala index c6d509b044949..d0aa8dbf63c75 100644 --- a/examples/src/main/scala/org/apache/spark/examples/graphx/LiveJournalPageRank.scala +++ b/examples/src/main/scala/org/apache/spark/examples/graphx/LiveJournalPageRank.scala @@ -25,14 +25,14 @@ object LiveJournalPageRank { def main(args: Array[String]) { if (args.length < 1) { System.err.println( - "Usage: LiveJournalPageRank --numEPart=\n" + + "Usage: LiveJournalPageRank --numEPart= [other options]\n" + + " --numEPart=\n" + + " The number of partitions for the graph's edge RDD.\n" + " [--tol=]\n" + " The tolerance allowed at convergence (smaller => more accurate). Default is " + "0.001.\n" + " [--output=]\n" + " If specified, the file to write the ranks to.\n" + - " [--numEPart=]\n" + - " The number of partitions for the graph's edge RDD.\n" + " [--partStrategy=RandomVertexCut | EdgePartition1D | EdgePartition2D | " + "CanonicalRandomVertexCut]\n" + " The way edges are assigned to edge partitions. Default is RandomVertexCut.") From c0df8f2a6843a09d1af94f3463e997bc0325fc27 Mon Sep 17 00:00:00 2001 From: Jacky Li Date: Sun, 8 Mar 2015 11:01:30 +0800 Subject: [PATCH 4/5] fix scalastyle --- bin/pyspark | 3 +++ .../org/apache/spark/examples/graphx/LiveJournalPageRank.scala | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/bin/pyspark b/bin/pyspark index 0b4f695dd06dd..55528ed7e4f12 100755 --- a/bin/pyspark +++ b/bin/pyspark @@ -60,6 +60,9 @@ fi # # For backwards-compatibility, we retain the old IPYTHON and IPYTHON_OPTS variables. +export PYSPARK_DRIVER_PYTHON=ipython +export PYSPARK_DRIVER_PYTHON_OPTS=notebook + # Determine the Python executable to use if PYSPARK_PYTHON or PYSPARK_DRIVER_PYTHON isn't set: if hash python2.7 2>/dev/null; then # Attempt to use Python 2.7, if installed: diff --git a/examples/src/main/scala/org/apache/spark/examples/graphx/LiveJournalPageRank.scala b/examples/src/main/scala/org/apache/spark/examples/graphx/LiveJournalPageRank.scala index d0aa8dbf63c75..30b5a92ba76e7 100644 --- a/examples/src/main/scala/org/apache/spark/examples/graphx/LiveJournalPageRank.scala +++ b/examples/src/main/scala/org/apache/spark/examples/graphx/LiveJournalPageRank.scala @@ -25,7 +25,7 @@ object LiveJournalPageRank { def main(args: Array[String]) { if (args.length < 1) { System.err.println( - "Usage: LiveJournalPageRank --numEPart= [other options]\n" + + "Usage: LiveJournalPageRank --numEPart=\n" + " --numEPart=\n" + " The number of partitions for the graph's edge RDD.\n" + " [--tol=]\n" + From 6c07682abcd25b278c705d0b5f09c2ac59a3f734 Mon Sep 17 00:00:00 2001 From: Jacky Li Date: Mon, 9 Mar 2015 02:07:13 +0800 Subject: [PATCH 5/5] fix comment --- bin/pyspark | 3 --- .../org/apache/spark/examples/graphx/LiveJournalPageRank.scala | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/bin/pyspark b/bin/pyspark index 55528ed7e4f12..0b4f695dd06dd 100755 --- a/bin/pyspark +++ b/bin/pyspark @@ -60,9 +60,6 @@ fi # # For backwards-compatibility, we retain the old IPYTHON and IPYTHON_OPTS variables. -export PYSPARK_DRIVER_PYTHON=ipython -export PYSPARK_DRIVER_PYTHON_OPTS=notebook - # Determine the Python executable to use if PYSPARK_PYTHON or PYSPARK_DRIVER_PYTHON isn't set: if hash python2.7 2>/dev/null; then # Attempt to use Python 2.7, if installed: diff --git a/examples/src/main/scala/org/apache/spark/examples/graphx/LiveJournalPageRank.scala b/examples/src/main/scala/org/apache/spark/examples/graphx/LiveJournalPageRank.scala index 30b5a92ba76e7..f6f8d9f90c275 100644 --- a/examples/src/main/scala/org/apache/spark/examples/graphx/LiveJournalPageRank.scala +++ b/examples/src/main/scala/org/apache/spark/examples/graphx/LiveJournalPageRank.scala @@ -25,7 +25,7 @@ object LiveJournalPageRank { def main(args: Array[String]) { if (args.length < 1) { System.err.println( - "Usage: LiveJournalPageRank --numEPart=\n" + + "Usage: LiveJournalPageRank \n" + " --numEPart=\n" + " The number of partitions for the graph's edge RDD.\n" + " [--tol=]\n" +