i am using intellij idea for spark application in scala. i am not sure why i am getting below error.
Code:
package batch
import java.lang.management.ManagementFactory
import org.apache.spark.{SparkConf, SparkContext}
object BatchJob {
def main(args: Array[String]): Unit = {
val conf = new SparkConf()
.setAppName("Lambda with Spark")
val sc = new SparkContext(conf)
val sourceFile = "file:///E:/Boxes/data.tsv"
val input = sc.textFile(sourceFile)
input.foreach(println)
}
}
Error:
**Exception in thread "main" org.apache.spark.SparkException: A master URL must be set in your configuration**