Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!
Error Message¶
Error initializzing SparkContext: A master URL must be set in your configuration.
Possible Causes¶
The master of Spark cluster is not specified.
Solutions¶
Add .master("yarn") into the following code
:::bash
val spark = SparkSession.builder()
.appName("SomeAppName")
.getOrCreate();making it become
:::bash
val spark = SparkSession.builder()
.master("yarn")
.appName("SomeAppName")
.getOrCreate();