diff options
author | gatorsmile <gatorsmile@gmail.com> | 2016-06-21 23:12:08 -0700 |
---|---|---|
committer | Joseph K. Bradley <joseph@databricks.com> | 2016-06-21 23:12:08 -0700 |
commit | 0e3ce75332dd536c0db8467d456ad46e4bf228f4 (patch) | |
tree | 2f9d0397ec0250072cdc8713f19c4dc432ccc790 /mllib/src/test | |
parent | 7580f3041a1a3757a0b14b9d8afeb720f261fff6 (diff) | |
download | spark-0e3ce75332dd536c0db8467d456ad46e4bf228f4.tar.gz spark-0e3ce75332dd536c0db8467d456ad46e4bf228f4.tar.bz2 spark-0e3ce75332dd536c0db8467d456ad46e4bf228f4.zip |
[SPARK-15644][MLLIB][SQL] Replace SQLContext with SparkSession in MLlib
#### What changes were proposed in this pull request?
This PR is to use the latest `SparkSession` to replace the existing `SQLContext` in `MLlib`. `SQLContext` is removed from `MLlib`.
Also fix a test case issue in `BroadcastJoinSuite`.
BTW, `SQLContext` is not being used in the `MLlib` test suites.
#### How was this patch tested?
Existing test cases.
Author: gatorsmile <gatorsmile@gmail.com>
Author: xiaoli <lixiao1983@gmail.com>
Author: Xiao Li <xiaoli@Xiaos-MacBook-Pro.local>
Closes #13380 from gatorsmile/sqlContextML.
Diffstat (limited to 'mllib/src/test')
-rw-r--r-- | mllib/src/test/java/org/apache/spark/ml/util/JavaDefaultReadWriteSuite.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mllib/src/test/java/org/apache/spark/ml/util/JavaDefaultReadWriteSuite.java b/mllib/src/test/java/org/apache/spark/ml/util/JavaDefaultReadWriteSuite.java index 7bda219243..e4f678fef1 100644 --- a/mllib/src/test/java/org/apache/spark/ml/util/JavaDefaultReadWriteSuite.java +++ b/mllib/src/test/java/org/apache/spark/ml/util/JavaDefaultReadWriteSuite.java @@ -56,7 +56,7 @@ public class JavaDefaultReadWriteSuite extends SharedSparkSession { } catch (IOException e) { // expected } - instance.write().context(spark.sqlContext()).overwrite().save(outputPath); + instance.write().session(spark).overwrite().save(outputPath); MyParams newInstance = MyParams.load(outputPath); Assert.assertEquals("UID should match.", instance.uid(), newInstance.uid()); Assert.assertEquals("Params should be preserved.", |