Skip to content

Commit

Permalink
Add comments for unclear classes and methods
Browse files Browse the repository at this point in the history
  • Loading branch information
zsxwing committed May 5, 2015
1 parent ff0bff8 commit b3f303e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,8 @@ private[streaming] class StreamingJobProgressListener(ssc: StreamingContext)
def streamIds: Seq[Int] = ssc.graph.getInputStreams().map(_.id)

/**
* Return all of the event rates for each InputDStream in each batch.
* Return all of the event rates for each InputDStream in each batch. The key of the return value
* is the stream id, and the value is a sequence of batch time with its event rate.
*/
def receivedEventRateWithBatchTime: Map[Int, Seq[(Long, Double)]] = synchronized {
val _retainedBatches = retainedBatches
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ import org.apache.spark.ui._
import org.apache.spark.ui.{UIUtils => SparkUIUtils}

/**
* A helper class to generate JavaScript and HTML for both timeline and histogram graphs.
*
* @param timelineDivId the timeline `id` used in the html `div` tag
* @param histogramDivId the timeline `id` used in the html `div` tag
* @param data the data for the graph
Expand Down Expand Up @@ -95,6 +97,9 @@ private[ui] class GraphUIData(
}

/**
* A helper class for "scheduling delay", "processing time" and "total delay" to generate data that
* will be used in the timeline and histogram graphs.
*
* @param data (batchTime, milliseconds). "milliseconds" is something like "processing time".
*/
private[ui] class MillisecondsStatUIData(data: Seq[(Long, Long)]) {
Expand All @@ -119,6 +124,9 @@ private[ui] class MillisecondsStatUIData(data: Seq[(Long, Long)]) {
}

/**
* A helper class for "input rate" to generate data that will be used in the timeline and histogram
* graphs.
*
* @param data (batchTime, event-rate).
*/
private[ui] class EventRateUIData(val data: Seq[(Long, Double)]) {
Expand Down

0 comments on commit b3f303e

Please sign in to comment.