We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d05f7a9 commit 3377e61Copy full SHA for 3377e61
core/src/main/scala/org/apache/spark/status/api/v1/JsonRootResource.scala
@@ -94,6 +94,11 @@ object JsonRootResource {
94
private[spark] trait UIRoot {
95
def getSparkUI(appKey: String): Option[SparkUI]
96
def getApplicationInfoList: Seq[ApplicationInfo]
97
+
98
+ /**
99
+ * Get the spark UI with the given appID, and apply a function
100
+ * to it. If there is no such app, throw an appropriate exception
101
+ */
102
def withSparkUI[T](appId: String)(f: SparkUI => T): T = {
103
getSparkUI(appId) match {
104
case Some(ui) => f(ui)
0 commit comments