Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ How to run spark program through Intellij?
- Set main class as
org.apache.spark.deploy.SparkSubmit
- Set program arguments as
--master local -- class <main_class> target/scala-2.12/<jar_name>
--master local --class <main_class> target/scala-2.12/<jar_name>
6 changes: 5 additions & 1 deletion src/main/scala/thoughtworks/Diamond.scala
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ import org.apache.spark.sql.SparkSession

object Diamond {
def main(args: Array[String]): Unit = {
val spark = SparkSession.builder().appName("Analyze Diamond Data Spark App").getOrCreate()
val spark = SparkSession
.builder()
.master("local")
.appName("Analyze Diamond Data Spark App")
.getOrCreate()

val diamondDF = spark.read
.option("header", true)
Expand Down