Repository: spark Updated Branches: refs/heads/master 5ffc73e68 -> c6d1efba2
[SPARK-7350] [STREAMING] [WEBUI] Attach the Streaming tab when calling ssc.start() It's meaningless to display the Streaming tab before `ssc.start()`. So we should attach it in the `ssc.start` method. Author: zsxwing <[email protected]> Closes #5898 from zsxwing/SPARK-7350 and squashes the following commits: e676487 [zsxwing] Attach the Streaming tab when calling ssc.start() Project: http://git-wip-us.apache.org/repos/asf/spark/repo Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/c6d1efba Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/c6d1efba Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/c6d1efba Branch: refs/heads/master Commit: c6d1efba29a4235130024fee9f118e6b2cb89ce1 Parents: 5ffc73e Author: zsxwing <[email protected]> Authored: Tue May 5 15:09:58 2015 +0100 Committer: Sean Owen <[email protected]> Committed: Tue May 5 15:09:58 2015 +0100 ---------------------------------------------------------------------- .../scala/org/apache/spark/streaming/StreamingContext.scala | 1 + .../main/scala/org/apache/spark/streaming/ui/StreamingTab.scala | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/spark/blob/c6d1efba/streaming/src/main/scala/org/apache/spark/streaming/StreamingContext.scala ---------------------------------------------------------------------- diff --git a/streaming/src/main/scala/org/apache/spark/streaming/StreamingContext.scala b/streaming/src/main/scala/org/apache/spark/streaming/StreamingContext.scala index 117cb59..b1ad0d4 100644 --- a/streaming/src/main/scala/org/apache/spark/streaming/StreamingContext.scala +++ b/streaming/src/main/scala/org/apache/spark/streaming/StreamingContext.scala @@ -527,6 +527,7 @@ class StreamingContext private[streaming] ( validate() sparkContext.setCallSite(DStream.getCreationSite()) scheduler.start() + uiTab.foreach(_.attach()) state = Started } http://git-wip-us.apache.org/repos/asf/spark/blob/c6d1efba/streaming/src/main/scala/org/apache/spark/streaming/ui/StreamingTab.scala ---------------------------------------------------------------------- diff --git a/streaming/src/main/scala/org/apache/spark/streaming/ui/StreamingTab.scala b/streaming/src/main/scala/org/apache/spark/streaming/ui/StreamingTab.scala index e403963..f307b54 100644 --- a/streaming/src/main/scala/org/apache/spark/streaming/ui/StreamingTab.scala +++ b/streaming/src/main/scala/org/apache/spark/streaming/ui/StreamingTab.scala @@ -37,7 +37,10 @@ private[spark] class StreamingTab(val ssc: StreamingContext) ssc.sc.addSparkListener(listener) attachPage(new StreamingPage(this)) attachPage(new BatchPage(this)) - parent.attachTab(this) + + def attach() { + getSparkUI(ssc).attachTab(this) + } def detach() { getSparkUI(ssc).detachTab(this) --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
