Return-Path: X-Original-To: apmail-spark-commits-archive@minotaur.apache.org Delivered-To: apmail-spark-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 78E3F1833B for ; Thu, 28 May 2015 20:42:44 +0000 (UTC) Received: (qmail 7516 invoked by uid 500); 28 May 2015 20:42:44 -0000 Delivered-To: apmail-spark-commits-archive@spark.apache.org Received: (qmail 7487 invoked by uid 500); 28 May 2015 20:42:44 -0000 Mailing-List: contact commits-help@spark.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list commits@spark.apache.org Received: (qmail 7478 invoked by uid 99); 28 May 2015 20:42:44 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 28 May 2015 20:42:44 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 496A1E1102; Thu, 28 May 2015 20:42:44 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: andrewor14@apache.org To: commits@spark.apache.org Message-Id: <92087d34d9254b4083eb5ffc0b70e705@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: spark git commit: [MINOR] Fix the a minor bug in PageRank Example. Date: Thu, 28 May 2015 20:42:44 +0000 (UTC) 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 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 Authored: Thu May 28 13:39:39 2015 -0700 Committer: Andrew Or 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-unsubscribe@spark.apache.org For additional commands, e-mail: commits-help@spark.apache.org