diff options
author | Joseph K. Bradley <joseph@databricks.com> | 2014-11-05 19:51:18 -0800 |
---|---|---|
committer | Xiangrui Meng <meng@databricks.com> | 2014-11-05 19:51:18 -0800 |
commit | c315d1316cb2372e90ae3a12f72d5b3304435a6b (patch) | |
tree | 72d7df00369bab0154ed315760050b8d95411039 | |
parent | cb0eae3b78d7f6f56c0b9521ee48564a4967d3de (diff) | |
download | spark-c315d1316cb2372e90ae3a12f72d5b3304435a6b.tar.gz spark-c315d1316cb2372e90ae3a12f72d5b3304435a6b.tar.bz2 spark-c315d1316cb2372e90ae3a12f72d5b3304435a6b.zip |
[SPARK-4254] [mllib] MovieLensALS bug fix
Changed code so it does not try to serialize Params.
CC: mengxr debasish83 srowen
Author: Joseph K. Bradley <joseph@databricks.com>
Closes #3116 from jkbradley/als-bugfix and squashes the following commits:
e575bd8 [Joseph K. Bradley] Merge remote-tracking branch 'upstream/master' into als-bugfix
9401b16 [Joseph K. Bradley] changed implicitPrefs so it is not serialized to fix MovieLensALS example bug
-rw-r--r-- | examples/src/main/scala/org/apache/spark/examples/mllib/MovieLensALS.scala | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/examples/src/main/scala/org/apache/spark/examples/mllib/MovieLensALS.scala b/examples/src/main/scala/org/apache/spark/examples/mllib/MovieLensALS.scala index 8796c28db8..91a0a860d6 100644 --- a/examples/src/main/scala/org/apache/spark/examples/mllib/MovieLensALS.scala +++ b/examples/src/main/scala/org/apache/spark/examples/mllib/MovieLensALS.scala @@ -106,9 +106,11 @@ object MovieLensALS { Logger.getRootLogger.setLevel(Level.WARN) + val implicitPrefs = params.implicitPrefs + val ratings = sc.textFile(params.input).map { line => val fields = line.split("::") - if (params.implicitPrefs) { + if (implicitPrefs) { /* * MovieLens ratings are on a scale of 1-5: * 5: Must see |