Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I change spark ui port?

Tags:

apache-spark

I have installed spark on a cluster, and I have marathon too, both are in the port 8080, How can I change the spark-ui default port?

like image 814
Asier Gomez Avatar asked Mar 18 '16 11:03

Asier Gomez


People also ask

How do I set a Spark UI port?

Every SparkContext launches its own instance of Web UI which is available at http://[driver]:4040 by default (the port can be changed using spark. ui. port setting) and will increase if this port is already taken (until an open port is found).

How do I check my Spark UI port?

If you are running the Spark application locally, Spark UI can be accessed using the http://localhost:4040/ . Spark UI by default runs on port 4040 and below are some of the additional UI's that would be helpful to track Spark application.


1 Answers

See http://spark.apache.org/docs/latest/spark-standalone.html:

You can optionally configure the cluster further by setting environment variables in conf/spark-env.sh. Create this file by starting with the conf/spark-env.sh.template, and copy it to all your worker machines for the settings to take effect. The following settings are available:

...

SPARK_MASTER_WEBUI_PORT - Port for the master web UI (default: 8080).

So - copy conf/spark-env.sh.template to conf/spark-env.sh, and edit it to include: SPARK_MASTER_WEBUI_PORT=<your preferred port>

like image 85
Tzach Zohar Avatar answered Oct 12 '22 23:10

Tzach Zohar