Let us consider the run() method of the BinaryClassification example:
def run(params: Params) {
val conf = new SparkConf().setAppName(s"BinaryClassification with $params")
val sc = new SparkContext(conf)
Notice that the SparkConf did not provide any means to configure the SparkMaster.
When running this program from Intellij with the following arguments:
--algorithm LR --regType L2 --regParam 1.0 data/mllib/sample_binary_classification_data.txt
the following error occurs:
Exception in thread "main" org.apache.spark.SparkException: A master URL must be set
in your configuration
at org.apache.spark.SparkContext.<init>(SparkContext.scala:166)
at org.apache.spark.examples.mllib.BinaryClassification$.run(BinaryClassification.scala:105)
I have also tried adding in the Spark Master url anyways (though the code seems NOT to support it ..)
spark://10.213.39.125:17088 --algorithm LR --regType L2 --regParam 1.0
data/mllib/sample_binary_classification_data.txt
and
--algorithm LR --regType L2 --regParam 1.0 spark://10.213.39.125:17088
data/mllib/sample_binary_classification_data.txt
Both do not work with error:
Error: Unknown argument 'data/mllib/sample_binary_classification_data.txt'