Skip to content


HistoryServer is an extension of the web UI for reviewing event logs of running (active) and completed Spark applications with event log collection enabled (based on spark.eventLog.enabled configuration property).

Starting HistoryServer Standalone Application

  argStrings: Array[String]): Unit

main creates a HistoryServerArguments (with the given argStrings arguments).

main initializes security.

main creates an ApplicationHistoryProvider (based on spark.history.provider configuration property).

main creates a HistoryServer (with the ApplicationHistoryProvider and spark.history.ui.port configuration property) and requests it to bind.

main requests the ApplicationHistoryProvider to start.

main registers a shutdown hook that requests the HistoryServer to stop and sleeps...till the end of the world (giving the daemon thread a go).

Creating Instance

HistoryServer takes the following to be created:

When created, HistoryServer initializes itself.

HistoryServer is created when HistoryServer standalone application is started.


HistoryServer is a ApplicationCacheOperations.


HistoryServer is a UIRoot.

Initializing HistoryServer

initialize(): Unit

initialize is part of the WebUI abstraction.


Attaching SparkUI

  appId: String,
  attemptId: Option[String],
  ui: SparkUI,
  completed: Boolean): Unit

attachSparkUI is part of the ApplicationCacheOperations abstraction.


Spark UI

  appId: String,
  attemptId: Option[String]): Option[LoadedAppUI]

getAppUI is part of the ApplicationCacheOperations abstraction.

getAppUI requests the ApplicationHistoryProvider for the Spark UI of a Spark application (based on the appId and attemptId).


Enable ALL logging level for org.apache.spark.deploy.history.HistoryServer logger to see what happens inside.

Add the following line to conf/

Refer to Logging.