@@ -33,7 +33,7 @@ private[streaming] class StreamingJobProgressListener(ssc: StreamingContext)
3333
3434 private val waitingBatchInfos = new HashMap [Time , BatchInfo ]
3535 private val runningBatchInfos = new HashMap [Time , BatchInfo ]
36- private val completedaBatchInfos = new Queue [BatchInfo ]
36+ private val completedBatchInfos = new Queue [BatchInfo ]
3737 private val batchInfoLimit = ssc.conf.getInt(" spark.streaming.ui.retainedBatches" , 100 )
3838 private var totalCompletedBatches = 0L
3939 private var totalReceivedRecords = 0L
@@ -62,7 +62,7 @@ private[streaming] class StreamingJobProgressListener(ssc: StreamingContext)
6262
6363 override def onBatchSubmitted (batchSubmitted : StreamingListenerBatchSubmitted ): Unit = {
6464 synchronized {
65- runningBatchInfos (batchSubmitted.batchInfo.batchTime) = batchSubmitted.batchInfo
65+ waitingBatchInfos (batchSubmitted.batchInfo.batchTime) = batchSubmitted.batchInfo
6666 }
6767 }
6868
@@ -79,8 +79,8 @@ private[streaming] class StreamingJobProgressListener(ssc: StreamingContext)
7979 synchronized {
8080 waitingBatchInfos.remove(batchCompleted.batchInfo.batchTime)
8181 runningBatchInfos.remove(batchCompleted.batchInfo.batchTime)
82- completedaBatchInfos .enqueue(batchCompleted.batchInfo)
83- if (completedaBatchInfos .size > batchInfoLimit) completedaBatchInfos .dequeue()
82+ completedBatchInfos .enqueue(batchCompleted.batchInfo)
83+ if (completedBatchInfos .size > batchInfoLimit) completedBatchInfos .dequeue()
8484 totalCompletedBatches += 1L
8585
8686 batchCompleted.batchInfo.receivedBlockInfo.foreach { case (_, infos) =>
@@ -118,7 +118,7 @@ private[streaming] class StreamingJobProgressListener(ssc: StreamingContext)
118118 }
119119
120120 def retainedCompletedBatches : Seq [BatchInfo ] = synchronized {
121- completedaBatchInfos .toSeq
121+ completedBatchInfos .toSeq
122122 }
123123
124124 def processingDelayDistribution : Option [Distribution ] = synchronized {
@@ -165,7 +165,7 @@ private[streaming] class StreamingJobProgressListener(ssc: StreamingContext)
165165 }
166166
167167 def lastCompletedBatch : Option [BatchInfo ] = {
168- completedaBatchInfos .sortBy(_.batchTime)(Time .ordering).lastOption
168+ completedBatchInfos .sortBy(_.batchTime)(Time .ordering).lastOption
169169 }
170170
171171 def lastReceivedBatch : Option [BatchInfo ] = {
@@ -174,10 +174,10 @@ private[streaming] class StreamingJobProgressListener(ssc: StreamingContext)
174174
175175 private def retainedBatches : Seq [BatchInfo ] = synchronized {
176176 (waitingBatchInfos.values.toSeq ++
177- runningBatchInfos.values.toSeq ++ completedaBatchInfos ).sortBy(_.batchTime)(Time .ordering)
177+ runningBatchInfos.values.toSeq ++ completedBatchInfos ).sortBy(_.batchTime)(Time .ordering)
178178 }
179179
180180 private def extractDistribution (getMetric : BatchInfo => Option [Long ]): Option [Distribution ] = {
181- Distribution (completedaBatchInfos .flatMap(getMetric(_)).map(_.toDouble))
181+ Distribution (completedBatchInfos .flatMap(getMetric(_)).map(_.toDouble))
182182 }
183183}
0 commit comments