Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose session name into kyuubi engine tab #2976

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ import org.apache.kyuubi.events.KyuubiEvent
*/
case class SessionEvent(
@KVIndexParam sessionId: String,
name: String,
engineId: String,
username: String,
ip: String,
Expand Down Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand All @@ -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>
Expand Down Expand Up @@ -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)
Expand Down