WebUI¶
WebUI is an abstraction of UIs.
Contract¶
Initializing¶
initialize(): Unit
Initializes components of the UI
Used by the implementations themselves.
Note
initialize does not add anything special to the Scala type hierarchy but a common name to use across WebUIs. In other words, initialize does not participate in any design pattern or a type hierarchy and serves no purpose of being part of the contract.
Implementations¶
- HistoryServer
- MasterWebUI (Spark Standalone)
- MesosClusterUI (Spark on Mesos)
- SparkUI
- WorkerWebUI (Spark Standalone)
Creating Instance¶
WebUI takes the following to be created:
-
SecurityManager -
SSLOptions - Port
- SparkConf
- Base Path (default: empty)
- Name (default: empty)
Abstract Class
WebUI is an abstract class and cannot be created directly. It is created indirectly for the concrete WebUIs.
Tabs¶
WebUI uses tabs registry for WebUITabs (that have been attached).
Tabs can be attached and detached.
Attaching Tab¶
attachTab(
tab: WebUITab): Unit
attachTab attaches the pages of the given WebUITab (and adds it to the tabs).
Detaching Tab¶
detachTab(
tab: WebUITab): Unit
detachTab detaches the pages of the given WebUITab (and removes it from the tabs).
Pages¶
WebUI uses pageToHandlers registry for WebUIPages and their associated ServletContextHandlers.
Pages can be attached and detached.
Attaching Page¶
attachPage(
page: WebUIPage): Unit
attachPage...FIXME
attachPage is used when:
WebUIis requested to attach a tab- others
Detaching Page¶
detachPage(
page: WebUIPage): Unit
detachPage removes the given WebUIPage from the UI (the pageToHandlers registry) with all of the handlers.
detachPage is used when:
WebUIis requested to detach a tab
Logging¶
Since WebUI is an abstract class, logging is configured using the logger of the implementations.