turboFei commented on code in PR #2911: URL: https://github.com/apache/incubator-kyuubi/pull/2911#discussion_r901076999
########## kyuubi-server/src/main/scala/org/apache/kyuubi/server/api/v1/BatchesResource.scala: ########## @@ -77,6 +79,34 @@ private[v1] class BatchesResource extends ApiRequestContext with Logging { batchOpStatus.completed) } + private def buildBatch( + metadata: Metadata, + batchAppStatus: Option[Map[String, String]]): Batch = { + batchAppStatus.map { appStatus => + val currentBatchState = + if (BatchJobSubmission.applicationFailed(batchAppStatus)) { Review Comment: backfill the batch state according to resource manager state. ########## kyuubi-server/src/main/scala/org/apache/kyuubi/operation/BatchJobSubmission.scala: ########## @@ -246,6 +241,7 @@ class BatchJobSubmission( throw new RuntimeException(s"$batchType batch[$batchId] job failed:" + applicationStatus.get.mkString(",")) } else { + updateBatchMetadata() Review Comment: if the batch is recovered and before its state is PENDING. We need update the state to RUNNING if get applicationId from resource manager before recovery. -- 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: notifications-unsubscr...@kyuubi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@kyuubi.apache.org For additional commands, e-mail: notifications-h...@kyuubi.apache.org