March 2019
Beginner to intermediate
182 pages
4h 6m
English
Let's now learn about integration testing using SparkSession.
In this section, we will cover the following topics:
Here, we are creating the Spark engine. The following line is crucial for the integration test:
val spark: SparkContext = SparkSession.builder().master("local[2]").getOrCreate().sparkContext
It is not a simple line just to create a lightweight object. SparkSession is a really heavy object and constructing it from scratch is an expensive operation from the perspective of resources and time. Tests such as creating SparkSession will take more time compared to the unit testing from the previous section.
For the ...
Read now
Unlock full access