Skip to content

Commit c315d13

Browse files
jkbradleymengxr
authored andcommitted
[SPARK-4254] [mllib] MovieLensALS bug fix
Changed code so it does not try to serialize Params. CC: mengxr debasish83 srowen Author: Joseph K. Bradley <[email protected]> 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
1 parent cb0eae3 commit c315d13

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

examples/src/main/scala/org/apache/spark/examples/mllib/MovieLensALS.scala

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,11 @@ object MovieLensALS {
106106

107107
Logger.getRootLogger.setLevel(Level.WARN)
108108

109+
val implicitPrefs = params.implicitPrefs
110+
109111
val ratings = sc.textFile(params.input).map { line =>
110112
val fields = line.split("::")
111-
if (params.implicitPrefs) {
113+
if (implicitPrefs) {
112114
/*
113115
* MovieLens ratings are on a scale of 1-5:
114116
* 5: Must see

0 commit comments

Comments
 (0)