Github user tdas commented on a diff in the pull request:
https://github.com/apache/spark/pull/5533#discussion_r29633916
--- Diff:
streaming/src/main/scala/org/apache/spark/streaming/ui/StreamingJobProgressListener.scala
---
@@ -175,39 +176,41 @@ private[streaming] class
StreamingJobProgressListener(ssc: StreamingContext)
completedBatchUIData.toSeq
}
- def processingDelayDistribution: Option[Distribution] = synchronized {
- extractDistribution(_.processingDelay)
+ def streamName(streamId: Int): Option[String] = {
+ ssc.graph.getInputStreamName(streamId)
}
- def schedulingDelayDistribution: Option[Distribution] = synchronized {
- extractDistribution(_.schedulingDelay)
- }
+ /**
+ * Return all InputDStream Ids
+ */
+ def streamIds: Seq[Int] = ssc.graph.getInputStreams().map(_.id)
- def totalDelayDistribution: Option[Distribution] = synchronized {
- extractDistribution(_.totalDelay)
- }
-
- def receivedRecordsDistributions: Map[Int, Option[Distribution]] =
synchronized {
- val latestBatchInfos = retainedBatches.reverse.take(batchUIDataLimit)
- val latestReceiverNumRecords =
latestBatchInfos.map(_.receiverNumRecords)
- val streamIds = ssc.graph.getInputStreams().map(_.id)
- streamIds.map { id =>
- val recordsOfParticularReceiver =
- latestReceiverNumRecords.map(v => v.getOrElse(id, 0L).toDouble *
1000 / batchDuration)
- val distribution = Distribution(recordsOfParticularReceiver)
- (id, distribution)
+ /**
+ * Return all of the event rates for each InputDStream in each batch.
+ */
--- End diff --
Can update comment to make it clear what this return type is. Its hard to
guess from `Map[Int, Seq[(Long, Double)]]`.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]