Skip to content

Commit 1c0bcef

Browse files
committed
Refactored streaming UI into two files.
1 parent 1af239b commit 1c0bcef

File tree

3 files changed

+50
-10
lines changed

3 files changed

+50
-10
lines changed

streaming/src/main/scala/org/apache/spark/streaming/ui/StreamingUI.scala renamed to streaming/src/main/scala/org/apache/spark/streaming/ui/StreamingPage.scala

+1-10
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ import javax.servlet.http.HttpServletRequest
2323
import scala.xml.Node
2424

2525
import org.apache.spark.Logging
26-
import org.apache.spark.streaming.StreamingContext
2726
import org.apache.spark.ui._
2827
import org.apache.spark.util.Distribution
2928

29+
/** Page for Spark Web UI that shows statistics of a streaming job */
3030
private[ui] class StreamingPage(parent: StreamingTab)
3131
extends UIPage("") with Logging {
3232

@@ -287,12 +287,3 @@ private[ui] class StreamingPage(parent: StreamingTab)
287287
}
288288
}
289289

290-
private[spark] class StreamingTab(val ssc: StreamingContext)
291-
extends UITab("streaming") with Logging {
292-
293-
val streamingPage = new StreamingPage(this)
294-
ssc.sc.ui.attachTab(this)
295-
296-
/** Initialize listener and attach pages. */
297-
def start() { }
298-
}

streaming/src/main/scala/org/apache/spark/streaming/ui/StreamingProgressListener.scala

+17
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one or more
3+
* contributor license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright ownership.
5+
* The ASF licenses this file to You under the Apache License, Version 2.0
6+
* (the "License"); you may not use this file except in compliance with
7+
* the License. You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
118
package org.apache.spark.streaming.ui
219

320
import org.apache.spark.streaming.{Time, StreamingContext}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one or more
3+
* contributor license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright ownership.
5+
* The ASF licenses this file to You under the Apache License, Version 2.0
6+
* (the "License"); you may not use this file except in compliance with
7+
* the License. You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
18+
package org.apache.spark.streaming.ui
19+
20+
import org.apache.spark.streaming.StreamingContext
21+
import org.apache.spark.ui.UITab
22+
import org.apache.spark.Logging
23+
24+
/** Spark Web UI tab that shows statistics of a streaming job */
25+
private[spark] class StreamingTab(val ssc: StreamingContext)
26+
extends UITab("streaming") with Logging {
27+
28+
val streamingPage = new StreamingPage(this)
29+
ssc.sc.ui.attachTab(this)
30+
31+
def start() { }
32+
}

0 commit comments

Comments
 (0)