juliuszsompolski commented on a change in pull request #26246:
[SPARK-29589][WEBUI] Support pagination for sqlstats session table in JDBC/ODBC
Session page
URL: https://github.com/apache/spark/pull/26246#discussion_r346264666
##########
File path:
sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/ui/ThriftServerSessionPage.scala
##########
@@ -80,45 +77,52 @@ private[ui] class ThriftServerSessionPage(parent:
ThriftServerTab)
.filter(_.sessionId == sessionID)
val numStatement = executionList.size
val table = if (numStatement > 0) {
- val headerRow = Seq("User", "JobID", "GroupID", "Start Time", "Finish
Time", "Close Time",
- "Execution Time", "Duration", "Statement", "State", "Detail")
- val tooltips = Seq(None, None, None, None,
Some(THRIFT_SERVER_FINISH_TIME),
- Some(THRIFT_SERVER_CLOSE_TIME), Some(THRIFT_SERVER_EXECUTION),
- Some(THRIFT_SERVER_DURATION), None, None, None)
- assert(headerRow.length == tooltips.length)
- val dataRows = executionList.sortBy(_.startTimestamp).reverse
-
- def generateDataRow(info: ExecutionInfo): Seq[Node] = {
- val jobLink = info.jobId.map { id: String =>
- <a href={"%s/jobs/job/?id=%s".format(
- UIUtils.prependBaseUri(request, parent.basePath), id)}>
- [{id}]
- </a>
+
+ val sqlTableTag = "sqlsessionstat"
+
+ val parameterOtherTable = request.getParameterMap().asScala
+ .filterNot(_._1.startsWith(sqlTableTag))
+ .map { case (name, vals) =>
+ name + "=" + vals(0)
}
- val detail =
Option(info.detail).filter(!_.isEmpty).getOrElse(info.executePlan)
- <tr>
- <td>{info.userName}</td>
- <td>
- {jobLink}
- </td>
- <td>{info.groupId}</td>
- <td>{formatDate(info.startTimestamp)}</td>
- <td>{if (info.finishTimestamp > 0)
formatDate(info.finishTimestamp)}</td>
- <td>{if (info.closeTimestamp > 0)
formatDate(info.closeTimestamp)}</td>
- <td
sorttable_customkey={info.totalTime(info.finishTimestamp).toString}>
Review comment:
Thanks for the explanation @shahidki31 !
Indeed it works, sorry for my confusion.
----------------------------------------------------------------
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]