Skip to content

Commit 70d8533

Browse files
committed
Remove BatchInfo.numRecords and a few renames
1 parent 7bbdc0a commit 70d8533

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

streaming/src/main/scala/org/apache/spark/streaming/scheduler/BatchInfo.scala

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,4 @@ case class BatchInfo(
5858
*/
5959
def totalDelay: Option[Long] = schedulingDelay.zip(processingDelay)
6060
.map(x => x._1 + x._2).headOption
61-
62-
/**
63-
* The number of recorders received by the receivers in this batch.
64-
*/
65-
def numRecords: Long = receivedBlockInfo.map { case (_, infos) =>
66-
infos.map(_.numRecords).sum
67-
}.sum
6861
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,8 @@ private[streaming] class StreamingJobProgressListener(ssc: StreamingContext)
182182
* Return all of the event rates for each receiver in each batch.
183183
*/
184184
def receivedEventRateWithBatchTime: Map[Int, Seq[(Long, Double)]] = synchronized {
185-
val latestBatches = retainedBatches.map { batchInfo =>
186-
(batchInfo.batchTime.milliseconds, batchInfo.receiverNumRecords)
185+
val latestBatches = retainedBatches.map { batchUIData =>
186+
(batchUIData.batchTime.milliseconds, batchUIData.receiverNumRecords)
187187
}
188188
(0 until numReceivers).map { receiverId =>
189189
val eventRates = latestBatches.map {

0 commit comments

Comments
 (0)