Github user LantaoJin commented on a diff in the pull request:
https://github.com/apache/spark/pull/22034#discussion_r208784817
--- Diff: core/src/main/scala/org/apache/spark/executor/Executor.scala ---
@@ -169,6 +171,19 @@ private[spark] class Executor(
startDriverHeartbeater()
+ /**
+ * We add an empty WebUI in executor to enable Executor MetricsServlet
sink if needed.
+ */
+ private val executorWebUiEnabled =
conf.getBoolean("spark.executor.ui.enabled", false)
+ private[executor] var webUi: ExecutorWebUI = _
+ if (executorWebUiEnabled && !isLocal) {
+ webUi = new ExecutorWebUI(conf, env.securityManager,
SparkUI.getUIPort(conf))
+ webUi.bind()
+ env.metricsSystem.getServletHandlers.foreach(webUi.attachHandler)
+ heartbeatReceiverRef.ask[Boolean](ReportExecutorWebUrl(executorId,
webUi.webUrl))
+ logInfo(s"Starting executor web ui at ${webUi.webUrl}")
--- End diff --
Thanks @jerryshao . It's overkill for this purpose. But it offers a pull
way to get executor metrics. I will think twice how to keep a pull way to get
that.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]