Skip to content

Commit 14b7ea6

Browse files
committed
address comments
1 parent f487cb2 commit 14b7ea6

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

mllib/src/main/scala/org/apache/spark/mllib/recommendation/MatrixFactorizationModel.scala

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ class MatrixFactorizationModel(
130130
recommend(productFeatures.lookup(product).head, userFeatures, num)
131131
.map(t => Rating(t._1, product, t._2))
132132

133-
override val formatVersion: String = "1.0"
133+
protected override val formatVersion: String = "1.0"
134134

135135
override def save(sc: SparkContext, path: String): Unit = {
136136
MatrixFactorizationModel.SaveLoadV1_0.save(this, path)
@@ -148,7 +148,7 @@ class MatrixFactorizationModel(
148148
}
149149
}
150150

151-
private object MatrixFactorizationModel extends Loader[MatrixFactorizationModel] {
151+
object MatrixFactorizationModel extends Loader[MatrixFactorizationModel] {
152152

153153
import org.apache.spark.mllib.util.Loader._
154154

@@ -159,17 +159,18 @@ private object MatrixFactorizationModel extends Loader[MatrixFactorizationModel]
159159
case (className, "1.0") if className == classNameV1_0 =>
160160
SaveLoadV1_0.load(sc, path)
161161
case _ =>
162-
throw new IOException("" +
163-
"MatrixFactorizationModel.load did not recognize model with" +
162+
throw new IOException("MatrixFactorizationModel.load did not recognize model with" +
164163
s"(class: $loadedClassName, version: $formatVersion). Supported:\n" +
165164
s" ($classNameV1_0, 1.0)")
166165
}
167166
}
168167

169-
private object SaveLoadV1_0 extends Loader[MatrixFactorizationModel] {
168+
private[recommendation]
169+
object SaveLoadV1_0 extends Loader[MatrixFactorizationModel] {
170170

171171
private val thisFormatVersion = "1.0"
172172

173+
private[recommendation]
173174
val thisClassName = "org.apache.spark.mllib.recommendation.MatrixFactorizationModel"
174175

175176
/**

0 commit comments

Comments
 (0)