iRakson commented on a change in pull request #28439:
URL: https://github.com/apache/spark/pull/28439#discussion_r433030132
##########
File path:
streaming/src/main/scala/org/apache/spark/streaming/ui/AllBatchesTable.scala
##########
@@ -49,147 +63,152 @@ private[ui] abstract class BatchTableBase(tableId:
String, batchInterval: Long)
}.getOrElse(<td>-</td>)
}
- protected def baseRow(batch: BatchUIData): Seq[Node] = {
- val batchTime = batch.batchTime.milliseconds
- val formattedBatchTime = SparkUIUtils.formatBatchTime(batchTime,
batchInterval)
- val numRecords = batch.numRecords
- val schedulingDelay = batch.schedulingDelay
- val formattedSchedulingDelay =
schedulingDelay.map(SparkUIUtils.formatDuration).getOrElse("-")
- val processingTime = batch.processingDelay
- val formattedProcessingTime =
processingTime.map(SparkUIUtils.formatDuration).getOrElse("-")
- val batchTimeId = s"batch-$batchTime"
-
- <td id={batchTimeId} sorttable_customkey={batchTime.toString}
- isFailed={batch.isFailed.toString}>
- <a href={s"batch?id=$batchTime"}>
- {formattedBatchTime}
- </a>
- </td>
- <td sorttable_customkey={numRecords.toString}>{numRecords.toString}
records</td>
- <td
sorttable_customkey={schedulingDelay.getOrElse(Long.MaxValue).toString}>
- {formattedSchedulingDelay}
- </td>
- <td
sorttable_customkey={processingTime.getOrElse(Long.MaxValue).toString}>
- {formattedProcessingTime}
- </td>
+ private def createOutputOperationProgressBar(batch: BatchUIData): Seq[Node]
= {
+ SparkUIUtils.makeProgressBar(
+ started = batch.numActiveOutputOp,
+ completed = batch.numCompletedOutputOp,
+ failed = batch.numFailedOutputOp,
+ skipped = 0,
+ reasonToNumKilled = Map.empty,
+ total = batch.outputOperations.size)
}
- private def batchTable: Seq[Node] = {
- <table id={tableId} class="table table-bordered table-striped table-sm
sortable">
- <thead>
- {columns}
- </thead>
- <tbody>
- {renderRows}
- </tbody>
- </table>
- }
+ override def tableId: String = s"$tableTag-table"
- def toNodeSeq: Seq[Node] = {
- batchTable
- }
+ override def tableCssClass: String =
+ "table table-bordered table-sm table-striped table-head-clickable
table-cell-width-limited"
- protected def createOutputOperationProgressBar(batch: BatchUIData):
Seq[Node] = {
- <td class="progress-cell">
Review comment:
I removed to maintain consistency. i.e
```
<td> ...... </td>
<td> ...... </td>
```
Anyway, i will use the original code.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]