[KYUUBI #2976] Expose session name into kyuubi engine tab
### _Why are the changes needed?_ Expose the session name in engine tab to make it more clear. ### _How was this patch tested?_ - [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible - [x] Add screenshots for manual tests if appropriate <img width="1724" alt="image" src="https://user-images.githubusercontent.com/6757692/176633011-7a3e9af3-7949-4a45-a7bc-8debebc2d376.png"> - [ ] [Run test](https://kyuubi.apache.org/docs/latest/develop_tools/testing.html#running-tests) locally before make a pull request Closes #2976 from turboFei/session_name. Closes #2976 05975619 [Fei Wang] save 03b577c3 [Fei Wang] expose session name Authored-by: Fei Wang <fwang12@ebay.com> Signed-off-by: Fei Wang <fwang12@ebay.com>
This commit is contained in:
parent
cec8b03f39
commit
2d0bb9f220
@ -39,6 +39,7 @@ import org.apache.kyuubi.events.KyuubiEvent
|
||||
*/
|
||||
case class SessionEvent(
|
||||
@KVIndexParam sessionId: String,
|
||||
name: String,
|
||||
engineId: String,
|
||||
username: String,
|
||||
ip: String,
|
||||
@ -67,6 +68,7 @@ object SessionEvent {
|
||||
def apply(session: SparkSessionImpl): SessionEvent = {
|
||||
new SessionEvent(
|
||||
session.handle.identifier.toString,
|
||||
session.name.getOrElse(""),
|
||||
KyuubiSparkUtil.engineId,
|
||||
session.user,
|
||||
session.ipAddress,
|
||||
|
||||
@ -250,6 +250,7 @@ case class EnginePage(parent: EngineTab) extends WebUIPage("") {
|
||||
("Client IP", true, None),
|
||||
("Server IP", true, None),
|
||||
("Session ID", true, None),
|
||||
("Session Name", true, None),
|
||||
("Start Time", true, None),
|
||||
("Finish Time", true, None),
|
||||
("Duration", true, None),
|
||||
@ -275,6 +276,7 @@ case class EnginePage(parent: EngineTab) extends WebUIPage("") {
|
||||
<td> {session.ip} </td>
|
||||
<td> {session.serverIp} </td>
|
||||
<td> <a href={sessionLink}> {session.sessionId} </a> </td>
|
||||
<td> {session.name} </td>
|
||||
<td> {formatDate(session.startTime)} </td>
|
||||
<td> {if (session.endTime > 0) formatDate(session.endTime)} </td>
|
||||
<td> {formatDurationVerbose(session.duration)} </td>
|
||||
@ -428,6 +430,7 @@ private class SessionStatsTableDataSource(
|
||||
case "Client IP" => Ordering.by(_.ip)
|
||||
case "Server IP" => Ordering.by(_.serverIp)
|
||||
case "Session ID" => Ordering.by(_.sessionId)
|
||||
case "Session Name" => Ordering.by(_.name)
|
||||
case "Start Time" => Ordering.by(_.startTime)
|
||||
case "Finish Time" => Ordering.by(_.endTime)
|
||||
case "Duration" => Ordering.by(_.duration)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user