pan3793 commented on code in PR #5243:
URL: https://github.com/apache/kyuubi/pull/5243#discussion_r1314971923
##########
kyuubi-server/src/main/scala/org/apache/kyuubi/operation/BatchJobSubmission.scala:
##########
@@ -295,19 +298,19 @@ class BatchJobSubmission(
}
if (_applicationInfo.isEmpty) {
info(s"The $batchType batch[$batchId] job: $appId not found, assume that
it has finished.")
- } else if (applicationFailed(_applicationInfo)) {
+ return
+ }
+ if (applicationFailed(_applicationInfo)) {
+ throw new KyuubiException(s"$batchType batch[$batchId] job failed:
${_applicationInfo}")
+ }
+ updateBatchMetadata()
+ // TODO: add limit for max batch job submission lifetime
+ while (_applicationInfo.isDefined &&
!applicationTerminated(_applicationInfo)) {
+ Thread.sleep(applicationCheckInterval)
+ updateApplicationInfoMetadataIfNeeded()
+ }
+ if (applicationFailed(_applicationInfo)) {
throw new KyuubiException(s"$batchType batch[$batchId] job failed:
${_applicationInfo}")
- } else {
Review Comment:
pure refactor, no logic change here
--
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]