Repository: spark Updated Branches: refs/heads/branch-1.2 d5763c3b9 -> c0a0eaacc
[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. Project: http://git-wip-us.apache.org/repos/asf/spark/repo Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/c0a0eaac Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/c0a0eaac Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/c0a0eaac Branch: refs/heads/branch-1.2 Commit: c0a0eaacc10a2d0bf2badf551e9068738b98b1d9 Parents: d5763c3 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:42:32 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/c0a0eaac/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