ulysses-you commented on code in PR #4119:
URL: https://github.com/apache/kyuubi/pull/4119#discussion_r1064264875
##########
kyuubi-server/src/main/scala/org/apache/kyuubi/operation/BatchJobSubmission.scala:
##########
@@ -96,7 +99,14 @@ class BatchJobSubmission(
override private[kyuubi] def currentApplicationInfo: Option[ApplicationInfo]
= {
// only the ApplicationInfo with non-empty id is valid for the operation
- applicationManager.getApplicationInfo(builder.clusterManager(),
batchId).filter(_.id != null)
+ val applicationInfo =
+ applicationManager.getApplicationInfo(builder.clusterManager(),
batchId).filter(_.id != null)
+ applicationInfo.foreach { _ =>
+ if (_appSubmissionTime <= 0) {
+ _appSubmissionTime = System.currentTimeMillis()
Review Comment:
I think we should make state machine and the time trace consistent.
If the submitssion time means when the state changes to running, then we
should update the time around this code
```
setStateIfNotCanceled(OperationState.RUNNING)
```
Otherwise the client may get the batch info with `submisstion time = 0 but
state is running` or `submisstion time != 0 but state is pending`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]