SuccessChanges

Summary

  1. [SPARK-30390][MLLIB] Avoid double caching in mllib.KMeans#runWithWeights (details)
Commit 4a234dd0e6ce9e6e62c780b26b6f3a95a8d70ac5 by srowen
[SPARK-30390][MLLIB] Avoid double caching in mllib.KMeans#runWithWeights
### What changes were proposed in this pull request? Check before
caching zippedData (as suggested in
https://github.com/apache/spark/pull/26483#issuecomment-569702482).
### Why are the changes needed? If the `data` is already cached before
calling `run` method of `KMeans` then `zippedData.persist()` will hurt
the performance. Hence, persisting it conditionally.
### Does this PR introduce any user-facing change? No
### How was this patch tested? Manually.
Closes #27052 from amanomer/29823followup.
Authored-by: Aman Omer <amanomer1996@gmail.com> Signed-off-by: Sean Owen
<srowen@gmail.com>
The file was modifiedmllib/src/main/scala/org/apache/spark/mllib/clustering/KMeans.scala (diff)