File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed
java/test/org/apache/spark/sql
scala/org/apache/spark/sql/execution/benchmark Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change 45
45
import static org .apache .spark .sql .types .DataTypes .*;
46
46
47
47
public class JavaDataFrameSuite {
48
- private static TestSparkSession spark ;
49
- private static JavaSparkContext jsc ;
48
+ private transient TestSparkSession spark ;
49
+ private transient JavaSparkContext jsc ;
50
50
51
- @ BeforeClass
52
- public static void setUp () {
51
+ @ Before
52
+ public void setUp () {
53
53
// Trigger static initializer of TestData
54
54
spark = new TestSparkSession ();
55
55
jsc = new JavaSparkContext (spark .sparkContext ());
56
56
spark .loadTestData ();
57
57
}
58
58
59
- @ AfterClass
60
- public static void tearDown () {
59
+ @ After
60
+ public void tearDown () {
61
61
spark .stop ();
62
62
spark = null ;
63
63
}
Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ class FilterPushdownBenchmark extends SparkFunSuite with BenchmarkBeforeAndAfter
55
55
private val mid = numRows / 2
56
56
private val blockSize = 1048576
57
57
58
- private val spark = SparkSession .builder().config(conf).getOrCreate()
58
+ private lazy val spark = SparkSession .builder().config(conf).getOrCreate()
59
59
60
60
private var out : OutputStream = _
61
61
You can’t perform that action at this time.
0 commit comments