Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to open Spark UI when working on a server?

Tags:

apache-spark

I am using Spark on my server with Ubuntu. I use the shell only and there is no UI for the server other than that. There is always an option of looking at the stats of Spark like jobs, cpus, memory etc when working on local computer on a web browser.

Is there a way that I can view all that information locally on the server?

like image 895
pg2455 Avatar asked Sep 01 '15 17:09

pg2455


People also ask

How do I launch Spark UI?

Open http://localhost:18080 in your browser to view the Spark UI locally.

Does Spark have a UI?

Apache Spark provides a suite of web user interfaces (UIs) that you can use to monitor the status and resource consumption of your Spark cluster.

How do you keep the Spark UI alive?

Solution to your Answer Before SparkContext to stop, use Thread. sleep(86400000). This will keep 24 hours active of your Spark UI until you kill the process.

How do I get to Spark UI in Databricks?

The web UI is accessible in Databricks by going to "Clusters" and then clicking on the "View Spark UI" link for your cluster, it is also available by clicking at the top left of this notebook where you would select the cluster to attach this notebook to. In this option will be a link to the Apache Spark Web UI.


2 Answers

spark-shell always starts a web UI on port 4040 by default. If the server has no graphical interface, you can either use a text-based browser, such as Links, or access port 4040 from another machine, such as your laptop. You may need to run ufw allow 4040 to unblock the port in the firewall.

like image 133
Daniel Darabos Avatar answered Sep 23 '22 20:09

Daniel Darabos


I think a python should be running on the server, so you can use this command:

python -m webbrowser -n http://host:port

(for example the application detail ui: http://localhost:4040). It gives a shell based browser if the server has no graphical interface

like image 30
szentesmarci Avatar answered Sep 22 '22 20:09

szentesmarci