-
Notifications
You must be signed in to change notification settings - Fork 864
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 more fields within session/batch data #6359
Conversation
kyuubi-rest-client/src/main/java/org/apache/kyuubi/client/api/v1/dto/SessionData.java
Outdated
Show resolved
Hide resolved
@@ -432,6 +432,7 @@ class JDBCMetadataStore(conf: KyuubiConf) extends MetadataStore with Logging { | |||
val createTime = resultSet.getLong("create_time") | |||
val engineType = resultSet.getString("engine_type") | |||
val clusterManager = Option(resultSet.getString("cluster_manager")) | |||
val engineOpenTime = resultSet.getLong("engine_open_time") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
engine_open_time bigint, -- the engine open time
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where is it assigned a value?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let me check
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
kyuubi/kyuubi-server/src/main/scala/org/apache/kyuubi/operation/BatchJobSubmission.scala
Lines 140 to 158 in 78e104d
private def updateBatchMetadata(): Unit = { | |
val endTime = if (isTerminalState(state)) lastAccessTime else 0L | |
if (isTerminalState(state) && _applicationInfo.isEmpty) { | |
_applicationInfo = Some(ApplicationInfo.NOT_FOUND) | |
} | |
_applicationInfo.foreach { appInfo => | |
val metadataToUpdate = Metadata( | |
identifier = batchId, | |
state = state.toString, | |
engineOpenTime = appStartTime, | |
engineId = appInfo.id, | |
engineName = appInfo.name, | |
engineUrl = appInfo.url.orNull, | |
engineState = appInfo.state.toString, | |
engineError = appInfo.error, | |
endTime = endTime) | |
session.sessionManager.updateMetadata(metadataToUpdate) |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #6359 +/- ##
============================================
- Coverage 58.49% 58.44% -0.06%
Complexity 24 24
============================================
Files 653 653
Lines 39865 39894 +29
Branches 5481 5481
============================================
- Hits 23319 23316 -3
- Misses 14055 14082 +27
- Partials 2491 2496 +5 ☔ View full report in Codecov by Sentry. |
thanks, merged to master |
🔍 Description
Issue References 🔗
This pull request fixes #
Describe Your Solution 🔧
Return
sessionName
andtotalOperations
withinSessionData
.Return
appStartTime
with list batches.Types of changes 🔖
Test Plan 🧪
Behavior Without This Pull Request ⚰️
Behavior With This Pull Request 🎉
Related Unit Tests
Checklist 📝
Be nice. Be informative.