Repository: spark Updated Branches: refs/heads/branch-1.4 7b5dffb80 -> 448528398
[MINOR] Fix the a minor bug in PageRank Example. Fix the bug that entering only 1 arg will cause array out of bounds exception in PageRank example. Author: Li Yao <hnkfli...@gmail.com> Closes #6455 from lastland/patch-1 and squashes the following commits: de06128 [Li Yao] Fix the bug that entering only 1 arg will cause array out of bounds exception. (cherry picked from commit c771589c96403b2a518fb77d5162eca8f495f37b) Signed-off-by: Andrew Or <and...@databricks.com> Project: http://git-wip-us.apache.org/repos/asf/spark/repo Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/44852839 Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/44852839 Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/44852839 Branch: refs/heads/branch-1.4 Commit: 4485283981e4592dd817fc8956b4a6faea06d817 Parents: 7b5dffb Author: Li Yao <hnkfli...@gmail.com> Authored: Thu May 28 13:39:39 2015 -0700 Committer: Andrew Or <and...@databricks.com> Committed: Thu May 28 13:39:49 2015 -0700 ---------------------------------------------------------------------- .../src/main/scala/org/apache/spark/examples/SparkPageRank.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/spark/blob/44852839/examples/src/main/scala/org/apache/spark/examples/SparkPageRank.scala ---------------------------------------------------------------------- diff --git a/examples/src/main/scala/org/apache/spark/examples/SparkPageRank.scala b/examples/src/main/scala/org/apache/spark/examples/SparkPageRank.scala index 8d092b6..bd7894f 100644 --- a/examples/src/main/scala/org/apache/spark/examples/SparkPageRank.scala +++ b/examples/src/main/scala/org/apache/spark/examples/SparkPageRank.scala @@ -51,7 +51,7 @@ object SparkPageRank { showWarning() val sparkConf = new SparkConf().setAppName("PageRank") - val iters = if (args.length > 0) args(1).toInt else 10 + val iters = if (args.length > 1) args(1).toInt else 10 val ctx = new SparkContext(sparkConf) val lines = ctx.textFile(args(0), 1) val links = lines.map{ s => --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org For additional commands, e-mail: commits-h...@spark.apache.org