-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
35 lines (32 loc) · 961 Bytes
/
build.sbt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import Dependencies._
lazy val root = (project in file(".")).
settings(
inThisBuild(List(
organization := "com.example",
scalaVersion := "2.12.13",
version := "0.1.0-SNAPSHOT"
)),
name := "SparkExample",
libraryDependencies ++= Seq(
spark.core % Provided,
spark.sql % Provided,
lemonlabs.uri,
scalaTest.funspec % Test
),
assemblyShadeRules in assembly := Seq(
ShadeRule.rename("cats.**" -> "cats.shaded.@1").inAll
)
)
initialCommands in console := """
import org.apache.log4j.{Level, Logger}
import org.apache.spark.sql.SparkSession
import org.apache.spark.sql.functions._
Logger.getLogger("org.apache.spark").setLevel(Level.WARN)
val spark = SparkSession.builder
.master("local[*]")
.appName("spark-shell")
.getOrCreate
import spark.implicits._
lazy val sc = spark.sparkContext
"""
cleanupCommands in console := "if (spark != null) spark.stop()"