Github user andrewor14 commented on a diff in the pull request:
https://github.com/apache/spark/pull/13101#discussion_r63933070
--- Diff: mllib/src/test/java/org/apache/spark/ml/JavaPipelineSuite.java ---
@@ -17,47 +17,30 @@
package org.apache.spark.ml;
-import org.junit.After;
-import org.junit.Before;
import org.junit.Test;
+import org.apache.spark.SharedSparkSession;
import org.apache.spark.api.java.JavaRDD;
-import org.apache.spark.api.java.JavaSparkContext;
import org.apache.spark.ml.classification.LogisticRegression;
import static
org.apache.spark.ml.classification.LogisticRegressionSuite.generateLogisticInputAsList;
import org.apache.spark.ml.feature.LabeledPoint;
import org.apache.spark.ml.feature.StandardScaler;
import org.apache.spark.sql.Dataset;
import org.apache.spark.sql.Row;
-import org.apache.spark.sql.SparkSession;
/**
* Test Pipeline construction and fitting in Java.
*/
-public class JavaPipelineSuite {
+public class JavaPipelineSuite extends SharedSparkSession {
- private transient SparkSession spark;
- private transient JavaSparkContext jsc;
private transient Dataset<Row> dataset;
- @Before
- public void setUp() {
- spark = SparkSession.builder()
- .master("local")
- .appName("JavaPipelineSuite")
- .getOrCreate();
- jsc = new JavaSparkContext(spark.sparkContext());
+ public void customSetUp() {
--- End diff --
Please add `@Override` everywhere we do this.
---
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]