Github user jkbradley commented on a diff in the pull request:
https://github.com/apache/spark/pull/12432#discussion_r60324307
--- Diff:
mllib/src/main/scala/org/apache/spark/mllib/clustering/KMeans.scala ---
@@ -209,9 +211,10 @@ class KMeans private (
/**
* Train a K-means model on the given set of points; `data` should be
cached for high
* performance, because this is an iterative algorithm.
+ * `instr` is used to log instrumentation parameters.
*/
@Since("0.8.0")
- def run(data: RDD[Vector]): KMeansModel = {
+ def run(data: RDD[Vector], instr: Instrumentation[clustering.KMeans] =
null): KMeansModel = {
--- End diff --
Default arguments are not Java friendly. You'll need to do this:
```
def run(data: RDD[Vector]): KMeansModel = {
run(data, None)
}
private[spark] def run(data: RDD[Vector], instr:
Option[Instrumentation[clustering.KMeans]]): KMeansModel = ...
```
That way, we will not change the public API. Note: I'd also use Option
instead of null.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]