aboutsummaryrefslogtreecommitdiff
path: root/python/pyspark/mllib/clustering.py
diff options
context:
space:
mode:
authorJoseph K. Bradley <joseph@databricks.com>2016-07-05 17:00:24 -0700
committerJoseph K. Bradley <joseph@databricks.com>2016-07-05 17:00:24 -0700
commitfdde7d0aa0ef69d0e9a88cf712601bba1d5b0706 (patch)
tree8f1c6be72c453dbd33d864c6ca54e2b2d28a480c /python/pyspark/mllib/clustering.py
parent59f9c1bd1adfea7069e769fb68351c228c37c8fc (diff)
downloadspark-fdde7d0aa0ef69d0e9a88cf712601bba1d5b0706.tar.gz
spark-fdde7d0aa0ef69d0e9a88cf712601bba1d5b0706.tar.bz2
spark-fdde7d0aa0ef69d0e9a88cf712601bba1d5b0706.zip
[SPARK-16348][ML][MLLIB][PYTHON] Use full classpaths for pyspark ML JVM calls
## What changes were proposed in this pull request? Issue: Omitting the full classpath can cause problems when calling JVM methods or classes from pyspark. This PR: Changed all uses of jvm.X in pyspark.ml and pyspark.mllib to use full classpath for X ## How was this patch tested? Existing unit tests. Manual testing in an environment where this was an issue. Author: Joseph K. Bradley <joseph@databricks.com> Closes #14023 from jkbradley/SPARK-16348.
Diffstat (limited to 'python/pyspark/mllib/clustering.py')
-rw-r--r--python/pyspark/mllib/clustering.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/python/pyspark/mllib/clustering.py b/python/pyspark/mllib/clustering.py
index 95f7278dc6..93a0b64569 100644
--- a/python/pyspark/mllib/clustering.py
+++ b/python/pyspark/mllib/clustering.py
@@ -507,7 +507,7 @@ class GaussianMixtureModel(JavaModelWrapper, JavaSaveable, JavaLoader):
Path to where the model is stored.
"""
model = cls._load_java(sc, path)
- wrapper = sc._jvm.GaussianMixtureModelWrapper(model)
+ wrapper = sc._jvm.org.apache.spark.mllib.api.python.GaussianMixtureModelWrapper(model)
return cls(wrapper)
@@ -638,7 +638,8 @@ class PowerIterationClusteringModel(JavaModelWrapper, JavaSaveable, JavaLoader):
Load a model from the given path.
"""
model = cls._load_java(sc, path)
- wrapper = sc._jvm.PowerIterationClusteringModelWrapper(model)
+ wrapper =\
+ sc._jvm.org.apache.spark.mllib.api.python.PowerIterationClusteringModelWrapper(model)
return PowerIterationClusteringModel(wrapper)