Skip to content

Commit c9676a6

Browse files
committed
add a comment about the last products.persist
1 parent d3a88aa commit c9676a6

File tree

1 file changed

+2
-0
lines changed
  • mllib/src/main/scala/org/apache/spark/mllib/recommendation

1 file changed

+2
-0
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,8 @@ class ALS private (
220220
}
221221
}
222222

223+
// The last `products` will be used twice. One to generate the last `users` and the other to
224+
// generate `productsOut`. So we cache it for better performance.
223225
products.persist()
224226

225227
// Flatten and cache the two final RDDs to un-block them

0 commit comments

Comments
 (0)