We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fe89391 commit c4c4740Copy full SHA for c4c4740
src/main/scala/com/sparkbyexamples/spark/SparkSessionWrapper.scala
@@ -0,0 +1,14 @@
1
+package com.sparkbyexamples.spark
2
+
3
+import org.apache.spark.sql.SparkSession
4
5
+trait SparkSessionWrapper {
6
+ lazy val spark: SparkSession = {
7
+ SparkSession
8
+ .builder()
9
+ .master("local")
10
+ .appName("spark session")
11
+ .config("spark.sql.shuffle.partitions", "1")
12
+ .getOrCreate()
13
+ }
14
+}
0 commit comments