Skip to content

Commit a0458f9

Browse files
committed
Clean the codes
1 parent b82ed1e commit a0458f9

File tree

2 files changed

+2
-13
lines changed

2 files changed

+2
-13
lines changed

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

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -169,17 +169,6 @@ private[streaming] class StreamingJobProgressListener(ssc: StreamingContext)
169169
}.toMap
170170
}
171171

172-
173-
/**
174-
* Return event rate for all receivers together in each batch time. These are pairs of
175-
* an event rate with a batch time.
176-
*/
177-
def eventRateForAllReceivers: Seq[(Long, Double)] = synchronized {
178-
retainedBatches.take(batchInfoLimit).map { batchInfo =>
179-
(batchInfo.batchTime.milliseconds, batchInfo.numRecords.toDouble * 1000 / batchDuration)
180-
}
181-
}
182-
183172
def lastReceivedBatchRecords: Map[Int, Long] = synchronized {
184173
val lastReceivedBlockInfoOption = lastReceivedBatch.map(_.receivedBlockInfo)
185174
lastReceivedBlockInfoOption.map { lastReceivedBlockInfo =>
@@ -195,7 +184,7 @@ private[streaming] class StreamingJobProgressListener(ssc: StreamingContext)
195184
receiverInfos.get(receiverId)
196185
}
197186

198-
def receiverLastErrorTimeo(receiverId: Int): Option[Long] = synchronized {
187+
def receiverLastErrorTime(receiverId: Int): Option[Long] = synchronized {
199188
receiverLastErrorTime.get(receiverId)
200189
}
201190

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ private[ui] class StreamingPage(parent: StreamingTab)
356356
if (msg.size > 100) msg.take(97) + "..." else msg
357357
}.getOrElse(emptyCell)
358358
val receiverLastErrorTime =
359-
listener.receiverLastErrorTimeo(receiverId).map(UIUtils.formatDate).getOrElse(emptyCell)
359+
listener.receiverLastErrorTime(receiverId).map(UIUtils.formatDate).getOrElse(emptyCell)
360360
val receivedRecords = listener.receivedRecordsWithBatchTime.get(receiverId).getOrElse(Seq())
361361

362362
val timelineForEventRate =

0 commit comments

Comments
 (0)