Skip to content

Commit

Permalink
Refactored streaming UI into two files.
Browse files Browse the repository at this point in the history
  • Loading branch information
tdas committed Apr 10, 2014
1 parent 1af239b commit 1c0bcef
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand Down Expand Up @@ -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() { }
}
Original file line number Diff line number Diff line change
@@ -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}
Expand Down
Original file line number Diff line number Diff line change
@@ -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() { }
}

0 comments on commit 1c0bcef

Please sign in to comment.