diff --git a/streaming/src/main/scala/org/apache/spark/streaming/ui/StreamingJobProgressListener.scala b/streaming/src/main/scala/org/apache/spark/streaming/ui/StreamingJobProgressListener.scala index 23db722db941a..de7e5fbe0b67d 100644 --- a/streaming/src/main/scala/org/apache/spark/streaming/ui/StreamingJobProgressListener.scala +++ b/streaming/src/main/scala/org/apache/spark/streaming/ui/StreamingJobProgressListener.scala @@ -169,17 +169,6 @@ private[streaming] class StreamingJobProgressListener(ssc: StreamingContext) }.toMap } - - /** - * Return event rate for all receivers together in each batch time. These are pairs of - * an event rate with a batch time. - */ - def eventRateForAllReceivers: Seq[(Long, Double)] = synchronized { - retainedBatches.take(batchInfoLimit).map { batchInfo => - (batchInfo.batchTime.milliseconds, batchInfo.numRecords.toDouble * 1000 / batchDuration) - } - } - def lastReceivedBatchRecords: Map[Int, Long] = synchronized { val lastReceivedBlockInfoOption = lastReceivedBatch.map(_.receivedBlockInfo) lastReceivedBlockInfoOption.map { lastReceivedBlockInfo => @@ -195,7 +184,7 @@ private[streaming] class StreamingJobProgressListener(ssc: StreamingContext) receiverInfos.get(receiverId) } - def receiverLastErrorTimeo(receiverId: Int): Option[Long] = synchronized { + def receiverLastErrorTime(receiverId: Int): Option[Long] = synchronized { receiverLastErrorTime.get(receiverId) } diff --git a/streaming/src/main/scala/org/apache/spark/streaming/ui/StreamingPage.scala b/streaming/src/main/scala/org/apache/spark/streaming/ui/StreamingPage.scala index 3ff9e9a530c58..843d2102bbbe5 100644 --- a/streaming/src/main/scala/org/apache/spark/streaming/ui/StreamingPage.scala +++ b/streaming/src/main/scala/org/apache/spark/streaming/ui/StreamingPage.scala @@ -356,7 +356,7 @@ private[ui] class StreamingPage(parent: StreamingTab) if (msg.size > 100) msg.take(97) + "..." else msg }.getOrElse(emptyCell) val receiverLastErrorTime = - listener.receiverLastErrorTimeo(receiverId).map(UIUtils.formatDate).getOrElse(emptyCell) + listener.receiverLastErrorTime(receiverId).map(UIUtils.formatDate).getOrElse(emptyCell) val receivedRecords = listener.receivedRecordsWithBatchTime.get(receiverId).getOrElse(Seq()) val timelineForEventRate =