Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I change the spark.ui.port?

I am using spark-submit and tried to do this in the jar file with .setExecutorEnv("spark.ui.port", "4050") on the spark context, but it still tried to hit 4040. I then tried to put a --conf spark.ui.port=4050 after spark-submit and before --class CLASSNAME, but that didn't work either, this time saying "Error: Unrecognized option '--conf'". How do I get around this? The actual error I'm running into is that there is an active spark server that others are using that is preventing this spark-submit from starting the jetty server. It's then not hitting up other ports, so I'm trying to force it to do that.

like image 592
user592419 Avatar asked Dec 09 '14 20:12

user592419


1 Answers

--conf spark.ui.port=4050 is a Spark 1.1 feature. You can set it in your codes, such as:

val conf = new SparkConf().setAppName(s"SimpleApp").set("spark.ui.port", "4050")
val sc = new SparkContext(conf)
like image 139
zsxwing Avatar answered Oct 16 '22 18:10

zsxwing