You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by rx...@apache.org on 2014/01/11 22:27:23 UTC
[1/2] git commit: Fix configure didn't work small problem in ALS
Updated Branches:
refs/heads/master ee6e7f9b8 -> 6510f04e4
Fix configure didn't work small problem in ALS
Project: http://git-wip-us.apache.org/repos/asf/incubator-spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-spark/commit/cbfbc019
Tree: http://git-wip-us.apache.org/repos/asf/incubator-spark/tree/cbfbc019
Diff: http://git-wip-us.apache.org/repos/asf/incubator-spark/diff/cbfbc019
Branch: refs/heads/master
Commit: cbfbc01938f4be051f6c5ae98874e735b1780925
Parents: 1d7bef0
Author: jerryshao <sa...@intel.com>
Authored: Sat Jan 11 16:22:45 2014 +0800
Committer: jerryshao <sa...@intel.com>
Committed: Sat Jan 11 16:22:45 2014 +0800
----------------------------------------------------------------------
.../org/apache/spark/mllib/recommendation/ALS.scala | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-spark/blob/cbfbc019/mllib/src/main/scala/org/apache/spark/mllib/recommendation/ALS.scala
----------------------------------------------------------------------
diff --git a/mllib/src/main/scala/org/apache/spark/mllib/recommendation/ALS.scala b/mllib/src/main/scala/org/apache/spark/mllib/recommendation/ALS.scala
index 8b27ecf..89ee070 100644
--- a/mllib/src/main/scala/org/apache/spark/mllib/recommendation/ALS.scala
+++ b/mllib/src/main/scala/org/apache/spark/mllib/recommendation/ALS.scala
@@ -22,7 +22,7 @@ import scala.util.Random
import scala.util.Sorting
import org.apache.spark.broadcast.Broadcast
-import org.apache.spark.{Logging, HashPartitioner, Partitioner, SparkContext}
+import org.apache.spark.{Logging, HashPartitioner, Partitioner, SparkContext, SparkConf}
import org.apache.spark.storage.StorageLevel
import org.apache.spark.rdd.RDD
import org.apache.spark.serializer.KryoRegistrator
@@ -578,12 +578,13 @@ object ALS {
val implicitPrefs = if (args.length >= 7) args(6).toBoolean else false
val alpha = if (args.length >= 8) args(7).toDouble else 1
val blocks = if (args.length == 9) args(8).toInt else -1
- val sc = new SparkContext(master, "ALS")
- sc.conf.set("spark.serializer", "org.apache.spark.serializer.KryoSerializer")
- sc.conf.set("spark.kryo.registrator", classOf[ALSRegistrator].getName)
- sc.conf.set("spark.kryo.referenceTracking", "false")
- sc.conf.set("spark.kryoserializer.buffer.mb", "8")
- sc.conf.set("spark.locality.wait", "10000")
+ val conf = new SparkConf()
+ .set("spark.serializer", "org.apache.spark.serializer.KryoSerializer")
+ .set("spark.kryo.registrator", classOf[ALSRegistrator].getName)
+ .set("spark.kryo.referenceTracking", "false")
+ .set("spark.kryoserializer.buffer.mb", "8")
+ .set("spark.locality.wait", "10000")
+ val sc = new SparkContext(master, "ALS", conf)
val ratings = sc.textFile(ratingsFile).map { line =>
val fields = line.split(',')
[2/2] git commit: Merge pull request #387 from jerryshao/conf-fix
Posted by rx...@apache.org.
Merge pull request #387 from jerryshao/conf-fix
Fix configure didn't work small problem in ALS
Project: http://git-wip-us.apache.org/repos/asf/incubator-spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-spark/commit/6510f04e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-spark/tree/6510f04e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-spark/diff/6510f04e
Branch: refs/heads/master
Commit: 6510f04e4dd99163acdc15ba5fc2bcbd8ff5d338
Parents: ee6e7f9 cbfbc01
Author: Reynold Xin <rx...@apache.org>
Authored: Sat Jan 11 12:48:26 2014 -0800
Committer: Reynold Xin <rx...@apache.org>
Committed: Sat Jan 11 12:48:26 2014 -0800
----------------------------------------------------------------------
.../org/apache/spark/mllib/recommendation/ALS.scala | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
----------------------------------------------------------------------