You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@kyuubi.apache.org by GitBox <gi...@apache.org> on 2022/08/23 11:43:52 UTC

[GitHub] [incubator-kyuubi] turboFei commented on a diff in pull request #3315: Fast fail the kyuubi connection if the engine application has been terminated

turboFei commented on code in PR #3315:
URL: https://github.com/apache/incubator-kyuubi/pull/3315#discussion_r952442307


##########
kyuubi-server/src/main/scala/org/apache/kyuubi/operation/BatchJobSubmission.scala:
##########
@@ -339,20 +339,10 @@ class BatchJobSubmission(
 
 object BatchJobSubmission {
   def applicationFailed(applicationStatus: Option[ApplicationInfo]): Boolean = {
-    applicationStatus.map(_.state).exists {
-      case ApplicationState.FAILED => true
-      case ApplicationState.KILLED => true
-      case _ => false
-    }
+    applicationStatus.map(_.state).exists(ApplicationState.isFailed)
   }
 
   def applicationTerminated(applicationStatus: Option[ApplicationInfo]): Boolean = {
-    applicationStatus.map(_.state).exists {
-      case ApplicationState.FAILED => true
-      case ApplicationState.KILLED => true
-      case ApplicationState.FINISHED => true
-      case ApplicationState.NOT_FOUND => true

Review Comment:
   Here I remove the `NOT_FOUND`, it should not in terminate state(might has not been submitted to RM). cc @ulysses-you 
   
   



-- 
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-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org