[KYUUBI #4506] Return sessionType in session data
### _Why are the changes needed?_ As title. ### _How was this patch tested?_ - [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible - [ ] Add screenshots for manual tests if appropriate - [ ] [Run test](https://kyuubi.readthedocs.io/en/master/develop_tools/testing.html#running-tests) locally before make a pull request Closes #4506 from turboFei/session_data_type. Closes #4506 9617ee68c [fwang12] Session type Authored-by: fwang12 <fwang12@ebay.com> Signed-off-by: fwang12 <fwang12@ebay.com>
This commit is contained in:
parent
f420238f4f
commit
316c9fd537
@ -32,6 +32,7 @@ public class SessionData {
|
||||
private Long duration;
|
||||
private Long idleTime;
|
||||
private String exception;
|
||||
private String sessionType;
|
||||
|
||||
public SessionData() {}
|
||||
|
||||
@ -43,7 +44,8 @@ public class SessionData {
|
||||
Long createTime,
|
||||
Long duration,
|
||||
Long idleTime,
|
||||
String exception) {
|
||||
String exception,
|
||||
String sessionType) {
|
||||
this.identifier = identifier;
|
||||
this.user = user;
|
||||
this.ipAddr = ipAddr;
|
||||
@ -52,6 +54,7 @@ public class SessionData {
|
||||
this.duration = duration;
|
||||
this.idleTime = idleTime;
|
||||
this.exception = exception;
|
||||
this.sessionType = sessionType;
|
||||
}
|
||||
|
||||
public String getIdentifier() {
|
||||
@ -121,6 +124,14 @@ public class SessionData {
|
||||
this.exception = exception;
|
||||
}
|
||||
|
||||
public String getSessionType() {
|
||||
return sessionType;
|
||||
}
|
||||
|
||||
public void setSessionType(String sessionType) {
|
||||
this.sessionType = sessionType;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
|
||||
@ -36,7 +36,8 @@ object ApiUtils {
|
||||
session.createTime,
|
||||
session.lastAccessTime - session.createTime,
|
||||
session.getNoOperationTime,
|
||||
session.getSessionEvent.flatMap(_.exception).map(Utils.prettyPrint).getOrElse(""))
|
||||
session.getSessionEvent.flatMap(_.exception).map(Utils.prettyPrint).getOrElse(""),
|
||||
session.sessionType.toString)
|
||||
}
|
||||
|
||||
def operationData(operation: KyuubiOperation): OperationData = {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user