Skip to content

Commit b3f303e

Browse files
committed
Add comments for unclear classes and methods
1 parent ff0bff8 commit b3f303e

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,8 @@ private[streaming] class StreamingJobProgressListener(ssc: StreamingContext)
186186
def streamIds: Seq[Int] = ssc.graph.getInputStreams().map(_.id)
187187

188188
/**
189-
* Return all of the event rates for each InputDStream in each batch.
189+
* Return all of the event rates for each InputDStream in each batch. The key of the return value
190+
* is the stream id, and the value is a sequence of batch time with its event rate.
190191
*/
191192
def receivedEventRateWithBatchTime: Map[Int, Seq[(Long, Double)]] = synchronized {
192193
val _retainedBatches = retainedBatches

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ import org.apache.spark.ui._
3030
import org.apache.spark.ui.{UIUtils => SparkUIUtils}
3131

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

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

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

0 commit comments

Comments
 (0)