Github user tdas commented on a diff in the pull request:
https://github.com/apache/spark/pull/4828#discussion_r26272770
--- Diff:
streaming/src/main/scala/org/apache/spark/streaming/ui/StreamingTab.scala ---
@@ -38,10 +38,14 @@ private[spark] class StreamingTab(ssc: StreamingContext)
parent.attachTab(this)
}
-private object StreamingTab {
+private[spark] object StreamingTab {
def getSparkUI(ssc: StreamingContext): SparkUI = {
ssc.sc.ui.getOrElse {
throw new SparkException("Parent SparkUI to attach this tab to not
found!")
}
}
+
--- End diff --
Can you move this code into the StreamingTab class? The code is related to
the tab instance, and so should be in the class. You could argue that
`getSparkUI` should also be in the class, however it needs to be called from
constructor (line 31) and hence cannot be in the class. But the `detach`
function should be in the class.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]