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

[REST] Return remote session id and remote operation id #5696

Closed
wants to merge 1 commit 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 @@ -25,6 +25,7 @@

public class OperationData {
private String identifier;
private String remoteId;
private String statement;
private String state;
private Long createTime;
Expand All @@ -41,6 +42,7 @@ public OperationData() {}

public OperationData(
String identifier,
String remoteId,
String statement,
String state,
Long createTime,
Expand All @@ -53,6 +55,7 @@ public OperationData(
String kyuubiInstance,
Map<String, String> metrics) {
this.identifier = identifier;
this.remoteId = remoteId;
this.statement = statement;
this.state = state;
this.createTime = createTime;
Expand All @@ -74,6 +77,14 @@ public void setIdentifier(String identifier) {
this.identifier = identifier;
}

public String getRemoteId() {
return remoteId;
}

public void setRemoteId(String remoteId) {
this.remoteId = remoteId;
}

public String getStatement() {
return statement;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

public class SessionData {
private String identifier;
private String remoteId;
private String user;
private String ipAddr;
private Map<String, String> conf;
Expand All @@ -40,6 +41,7 @@ public SessionData() {}

public SessionData(
String identifier,
String remoteId,
String user,
String ipAddr,
Map<String, String> conf,
Expand All @@ -51,6 +53,7 @@ public SessionData(
String kyuubiInstance,
String engineId) {
this.identifier = identifier;
this.remoteId = remoteId;
this.user = user;
this.ipAddr = ipAddr;
this.conf = conf;
Expand All @@ -71,6 +74,14 @@ public void setIdentifier(String identifier) {
this.identifier = identifier;
}

public String getRemoteId() {
return remoteId;
}

public void setRemoteId(String remoteId) {
this.remoteId = remoteId;
}

public String getUser() {
return user;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ object ApiUtils extends Logging {
val sessionEvent = session.getSessionEvent
new SessionData(
session.handle.identifier.toString,
sessionEvent.map(_.remoteSessionId).getOrElse(""),
session.user,
session.ipAddress,
session.conf.asJava,
Expand All @@ -48,6 +49,7 @@ object ApiUtils extends Logging {
val opEvent = KyuubiOperationEvent(operation)
new OperationData(
opEvent.statementId,
opEvent.remoteId,
opEvent.statement,
opEvent.state,
opEvent.createTime,
Expand Down
Loading