aboutsummaryrefslogtreecommitdiff
path: root/streaming
diff options
context:
space:
mode:
authorproflin <proflin.me@gmail.com>2015-12-11 13:50:36 -0800
committerShixiong Zhu <shixiong@databricks.com>2015-12-11 13:50:36 -0800
commit713e6959d21d24382ef99bbd7e9da751a7ed388c (patch)
treeb62c9478f5667cdd395e056fd58ce7233218b90f /streaming
parentaa305dcaf5b4148aba9e669e081d0b9235f50857 (diff)
downloadspark-713e6959d21d24382ef99bbd7e9da751a7ed388c.tar.gz
spark-713e6959d21d24382ef99bbd7e9da751a7ed388c.tar.bz2
spark-713e6959d21d24382ef99bbd7e9da751a7ed388c.zip
[SPARK-12273][STREAMING] Make Spark Streaming web UI list Receivers in order
Currently the Streaming web UI does NOT list Receivers in order; however, it seems more convenient for the users if Receivers are listed in order. ![spark-12273](https://cloud.githubusercontent.com/assets/15843379/11736602/0bb7f7a8-a00b-11e5-8e86-96ba9297fb12.png) Author: proflin <proflin.me@gmail.com> Closes #10264 from proflin/Spark-12273.
Diffstat (limited to 'streaming')
-rw-r--r--streaming/src/main/scala/org/apache/spark/streaming/ui/StreamingPage.scala5
1 files changed, 3 insertions, 2 deletions
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 4588b2163c..88a4483e80 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
@@ -392,8 +392,9 @@ private[ui] class StreamingPage(parent: StreamingTab)
maxX: Long,
minY: Double,
maxY: Double): Seq[Node] = {
- val content = listener.receivedEventRateWithBatchTime.map { case (streamId, eventRates) =>
- generateInputDStreamRow(jsCollector, streamId, eventRates, minX, maxX, minY, maxY)
+ val content = listener.receivedEventRateWithBatchTime.toList.sortBy(_._1).map {
+ case (streamId, eventRates) =>
+ generateInputDStreamRow(jsCollector, streamId, eventRates, minX, maxX, minY, maxY)
}.foldLeft[Seq[Node]](Nil)(_ ++ _)
// scalastyle:off