Skip to content

Commit 9401b16

Browse files
committed
changed implicitPrefs so it is not serialized to fix MovieLensALS example bug
1 parent c8abddc commit 9401b16

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)