Repository: spark
Updated Branches:
  refs/heads/branch-1.4 6f35dac50 -> 49923f7ca


[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()

(cherry picked from commit c6d1efba29a4235130024fee9f118e6b2cb89ce1)
Signed-off-by: Sean Owen <[email protected]>


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/49923f7c
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/49923f7c
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/49923f7c

Branch: refs/heads/branch-1.4
Commit: 49923f7ca92fcdeec3aae501822f5db380acf9cb
Parents: 6f35dac
Author: zsxwing <[email protected]>
Authored: Tue May 5 15:09:58 2015 +0100
Committer: Sean Owen <[email protected]>
Committed: Tue May 5 15:10:27 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/49923f7c/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/49923f7c/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]

Reply via email to