diff --git a/streaming/src/main/scala/org/apache/spark/streaming/ui/StreamingUI.scala b/streaming/src/main/scala/org/apache/spark/streaming/ui/StreamingPage.scala similarity index 97% rename from streaming/src/main/scala/org/apache/spark/streaming/ui/StreamingUI.scala rename to streaming/src/main/scala/org/apache/spark/streaming/ui/StreamingPage.scala index 81f883dadc798..8ef5ebb4cd96b 100644 --- a/streaming/src/main/scala/org/apache/spark/streaming/ui/StreamingUI.scala +++ b/streaming/src/main/scala/org/apache/spark/streaming/ui/StreamingPage.scala @@ -23,10 +23,10 @@ import javax.servlet.http.HttpServletRequest import scala.xml.Node import org.apache.spark.Logging -import org.apache.spark.streaming.StreamingContext import org.apache.spark.ui._ import org.apache.spark.util.Distribution +/** Page for Spark Web UI that shows statistics of a streaming job */ private[ui] class StreamingPage(parent: StreamingTab) extends UIPage("") with Logging { @@ -287,12 +287,3 @@ private[ui] class StreamingPage(parent: StreamingTab) } } -private[spark] class StreamingTab(val ssc: StreamingContext) - extends UITab("streaming") with Logging { - - val streamingPage = new StreamingPage(this) - ssc.sc.ui.attachTab(this) - - /** Initialize listener and attach pages. */ - def start() { } -} diff --git a/streaming/src/main/scala/org/apache/spark/streaming/ui/StreamingProgressListener.scala b/streaming/src/main/scala/org/apache/spark/streaming/ui/StreamingProgressListener.scala index 6db1af5245ce2..32a4644e2a3e9 100644 --- a/streaming/src/main/scala/org/apache/spark/streaming/ui/StreamingProgressListener.scala +++ b/streaming/src/main/scala/org/apache/spark/streaming/ui/StreamingProgressListener.scala @@ -1,3 +1,20 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.apache.spark.streaming.ui import org.apache.spark.streaming.{Time, StreamingContext} 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 new file mode 100644 index 0000000000000..1aaf7764b5ceb --- /dev/null +++ b/streaming/src/main/scala/org/apache/spark/streaming/ui/StreamingTab.scala @@ -0,0 +1,32 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.spark.streaming.ui + +import org.apache.spark.streaming.StreamingContext +import org.apache.spark.ui.UITab +import org.apache.spark.Logging + +/** Spark Web UI tab that shows statistics of a streaming job */ +private[spark] class StreamingTab(val ssc: StreamingContext) + extends UITab("streaming") with Logging { + + val streamingPage = new StreamingPage(this) + ssc.sc.ui.attachTab(this) + + def start() { } +}