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 0F9E210F4F for ; Wed, 17 Jul 2013 00:31:36 +0000 (UTC) Received: (qmail 42941 invoked by uid 500); 17 Jul 2013 00:31:36 -0000 Delivered-To: apmail-spark-commits-archive@spark.apache.org Received: (qmail 42911 invoked by uid 500); 17 Jul 2013 00:31:36 -0000 Mailing-List: contact commits-help@spark.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@spark.incubator.apache.org Delivered-To: mailing list commits@spark.incubator.apache.org Received: (qmail 42904 invoked by uid 99); 17 Jul 2013 00:31:36 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 Jul 2013 00:31:36 +0000 X-ASF-Spam-Status: No, hits=-2000.4 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO mail.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 17 Jul 2013 00:31:25 +0000 Received: (qmail 40551 invoked by uid 99); 17 Jul 2013 00:30:59 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 Jul 2013 00:30:59 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 4B6608AB02E; Wed, 17 Jul 2013 00:30:59 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: matei@apache.org To: commits@spark.incubator.apache.org Date: Wed, 17 Jul 2013 00:31:34 -0000 Message-Id: <720cdb1bceaa42f6a2679ec9a0b73858@git.apache.org> In-Reply-To: <4dd375300965489486521490464bdd15@git.apache.org> References: <4dd375300965489486521490464bdd15@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [37/50] [abbrv] git commit: Fix deprecation warning and style issues X-Virus-Checked: Checked by ClamAV on apache.org Fix deprecation warning and style issues Project: http://git-wip-us.apache.org/repos/asf/incubator-spark/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-spark/commit/f347cc3f Tree: http://git-wip-us.apache.org/repos/asf/incubator-spark/tree/f347cc3f Diff: http://git-wip-us.apache.org/repos/asf/incubator-spark/diff/f347cc3f Branch: refs/heads/master Commit: f347cc3f659d4414a21de26feadcbe23a130e622 Parents: 10c0593 Author: Matei Zaharia Authored: Tue Jul 16 10:53:30 2013 -0700 Committer: Matei Zaharia Committed: Tue Jul 16 10:53:30 2013 -0700 ---------------------------------------------------------------------- core/src/test/scala/spark/FileServerSuite.scala | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-spark/blob/f347cc3f/core/src/test/scala/spark/FileServerSuite.scala ---------------------------------------------------------------------- diff --git a/core/src/test/scala/spark/FileServerSuite.scala b/core/src/test/scala/spark/FileServerSuite.scala index 9c24ca4..c7855a7 100644 --- a/core/src/test/scala/spark/FileServerSuite.scala +++ b/core/src/test/scala/spark/FileServerSuite.scala @@ -35,26 +35,26 @@ class FileServerSuite extends FunSuite with LocalSparkContext { val testData = Array((1,1), (1,1), (2,1), (3,5), (2,2), (3,0)) val result = sc.parallelize(testData).reduceByKey { val path = SparkFiles.get("FileServerSuite.txt") - val in = new BufferedReader(new FileReader(path)) + val in = new BufferedReader(new FileReader(path)) val fileVal = in.readLine().toInt in.close() _ * fileVal + _ * fileVal - }.collect + }.collect() assert(result.toSet === Set((1,200), (2,300), (3,500))) } test("Distributing files locally using URL as input") { // addFile("file:///....") sc = new SparkContext("local[4]", "test") - sc.addFile((new File(tmpFile.toString)).toURL.toString) + sc.addFile(new File(tmpFile.toString).toURI.toString) val testData = Array((1,1), (1,1), (2,1), (3,5), (2,2), (3,0)) val result = sc.parallelize(testData).reduceByKey { val path = SparkFiles.get("FileServerSuite.txt") - val in = new BufferedReader(new FileReader(path)) + val in = new BufferedReader(new FileReader(path)) val fileVal = in.readLine().toInt in.close() _ * fileVal + _ * fileVal - }.collect + }.collect() assert(result.toSet === Set((1,200), (2,300), (3,500))) } @@ -80,11 +80,11 @@ class FileServerSuite extends FunSuite with LocalSparkContext { val testData = Array((1,1), (1,1), (2,1), (3,5), (2,2), (3,0)) val result = sc.parallelize(testData).reduceByKey { val path = SparkFiles.get("FileServerSuite.txt") - val in = new BufferedReader(new FileReader(path)) + val in = new BufferedReader(new FileReader(path)) val fileVal = in.readLine().toInt in.close() _ * fileVal + _ * fileVal - }.collect + }.collect() assert(result.toSet === Set((1,200), (2,300), (3,500))) }