@@ -85,7 +85,7 @@ private[ui] class StreamingPage(parent: StreamingTab)
85
85
val headerRow = Seq (
86
86
" Receiver" ,
87
87
" Location" ,
88
- s " Records in last batch " ,
88
+ " Records in last batch" ,
89
89
" Minimum rate\n [records/sec]" ,
90
90
" 25th percentile rate\n [records/sec]" ,
91
91
" Median rate\n [records/sec]" ,
@@ -102,8 +102,7 @@ private[ui] class StreamingPage(parent: StreamingTab)
102
102
}.getOrElse {
103
103
Seq (emptyCellTest, emptyCellTest, emptyCellTest, emptyCellTest, emptyCellTest)
104
104
}
105
- Seq (receiverName, receiverLocation, receiverLastBatchRecords) ++
106
- receivedRecordStats
105
+ Seq (receiverName, receiverLocation, receiverLastBatchRecords) ++ receivedRecordStats
107
106
}
108
107
Some (listingTable(headerRow, dataRows, fixedWidth = true ))
109
108
} else {
@@ -225,15 +224,18 @@ private[ui] class StreamingPage(parent: StreamingTab)
225
224
day -> s " $hourString $minuteString $secondString" ,
226
225
week -> s " $dayString $hourString $minuteString" ,
227
226
year -> s " $weekString $dayString $hourString"
228
- ).foreach {
229
- case (durationLimit, durationString) if (ms < durationLimit) =>
227
+ ).foreach { case (durationLimit, durationString) =>
228
+ if (ms < durationLimit) {
229
+ // if time is less than the limit (upto year)
230
230
return durationString
231
- case e : Any => // matcherror is thrown without this
231
+ }
232
232
}
233
+ // if time is more than a year
233
234
return s " $yearString $weekString $dayString"
234
235
} catch {
235
236
case e : Exception =>
236
237
logError(" Error converting time to string" , e)
238
+ // if there is some error, return blank string
237
239
return " "
238
240
}
239
241
}
0 commit comments