Skip to content

Commit

Permalink
Update SparkSesssion.builder to remove appName and master spark-examp…
Browse files Browse the repository at this point in the history
  • Loading branch information
bekisz committed Oct 4, 2024
1 parent 06b1578 commit 0bbceb9
Show file tree
Hide file tree
Showing 12 changed files with 0 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ import org.apache.spark.sql.{SQLContext, SparkSession}
object SQLContextExample extends App {

val spark = SparkSession.builder()
.master("local[1]")
.appName("SparkByExamples.com")
.getOrCreate();

spark.sparkContext.setLogLevel("ERROR")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ trait SparkSessionWrapper {
lazy val spark: SparkSession = {
SparkSession
.builder()
.master("local")
.appName("spark session")
.config("spark.sql.shuffle.partitions", "1")
.getOrCreate()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ import org.apache.spark.sql.{SaveMode, SparkSession}
object AvroToJson extends App {

val spark: SparkSession = SparkSession.builder()
.master("local[1]")
.appName("SparkByExample")
.getOrCreate()

spark.sparkContext.setLogLevel("ERROR")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ import org.apache.spark.sql.{SaveMode, SparkSession}
object AvroToParquet extends App {

val spark: SparkSession = SparkSession.builder()
.master("local[1]")
.appName("SparkByExample")
.getOrCreate()

spark.sparkContext.setLogLevel("ERROR")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ import org.apache.spark.sql.{SaveMode, SparkSession}
object CsvToAvroParquetJson extends App {

val spark: SparkSession = SparkSession.builder()
.master("local[1]")
.appName("SparkByExample")
.getOrCreate()

spark.sparkContext.setLogLevel("ERROR")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ import org.apache.spark.sql.SparkSession
object JsonToAvroCsvParquet extends App {

val spark: SparkSession = SparkSession.builder()
.master("local[1]")
.appName("SparkByExample")
.getOrCreate()

spark.sparkContext.setLogLevel("ERROR")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ import org.apache.spark.sql.{SaveMode, SparkSession}
object ParquetToAvro extends App {

val spark: SparkSession = SparkSession.builder()
.master("local[1]")
.appName("SparkByExample")
.getOrCreate()

spark.sparkContext.setLogLevel("ERROR")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ import org.apache.spark.sql.SparkSession
object DataFrameEmptyCheck extends App {

val spark:SparkSession = SparkSession.builder()
.master("local[1]")
.appName("SparkByExample")
.getOrCreate()

val df = spark.emptyDataFrame
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ object OperationOnPairRDDComplex extends App{


val spark = SparkSession.builder()
.appName("SparkByExample")
.master("local")
.getOrCreate()

spark.sparkContext.setLogLevel("ERROR")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ import org.apache.spark.sql.SparkSession
object RDDAccumulator extends App {

val spark = SparkSession.builder()
.appName("SparkByExample")
.master("local")
.getOrCreate()

val longAcc = spark.sparkContext.longAccumulator("SumAccumulator")
Expand Down
2 changes: 0 additions & 2 deletions src/main/scala/com/sparkbyexamples/spark/rdd/RDDActions.scala
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ import scala.collection.mutable
object RDDActions extends App {

val spark = SparkSession.builder()
.appName("SparkByExample")
.master("local")
.getOrCreate()

spark.sparkContext.setLogLevel("ERROR")
Expand Down
2 changes: 0 additions & 2 deletions src/main/scala/com/sparkbyexamples/spark/rdd/RDDPrint.scala
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ import org.apache.spark.sql.SparkSession
object RDDPrint extends App{

val spark:SparkSession = SparkSession.builder()
.master("local[1]")
.appName("SparkByExample")
.getOrCreate()
val dept = List(("Finance",10),("Marketing",20),
("Sales",30), ("IT",40))
Expand Down

0 comments on commit 0bbceb9

Please sign in to comment.