shahidki31 commented on a change in pull request #26253: [SPARK-29599][WEBUI]
Support pagination for session table in JDBC/ODBC Tab
URL: https://github.com/apache/spark/pull/26253#discussion_r339061591
##########
File path:
sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/ui/ThriftServerPage.scala
##########
@@ -442,3 +627,45 @@ private[ui] class SqlStatsPagedTable(
}
}
+
+ private[ui] class SessionStatsTableDataSource(
+ info: Seq[SessionInfo],
+ pageSize: Int,
+ sortColumn: String,
+ desc: Boolean) extends PagedDataSource[SessionInfo](pageSize) {
+
+ // Sorting SessionInfo data
+ private val data = info.sorted(ordering(sortColumn, desc))
+
+ private var _slicedStartTime: Set[Long] = null
+
+ override def dataSize: Int = data.size
+
+ override def sliceData(from: Int, to: Int): Seq[SessionInfo] = {
+ val r = data.slice(from, to)
+ r.map(x => x)
Review comment:
Yes, we can remove the line.
----------------------------------------------------------------
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]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]