You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kyuubi.apache.org by GitBox <gi...@apache.org> on 2021/11/30 12:11:43 UTC

[GitHub] [incubator-kyuubi] cxzl25 opened a new pull request #1474: [KYUUBI #1473] Exit gracefully when engine idle

cxzl25 opened a new pull request #1474:
URL: https://github.com/apache/incubator-kyuubi/pull/1474


   ### _Why are the changes needed?_
   It is not graceful to exit when engine is idle, which may cause AM to try again.
   The current workaround is to configure `spark.yarn.maxAppAttempts`.
   
   ```
   yarn.ApplicationMaster: Final app status: FAILED, exitCode: 16, (reason: Shutdown hook called before final status was reported.)
   ```
   
   
   ### _How was this patch tested?_
   - [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible
   
   - [ ] Add screenshots for manual tests if appropriate
   
   - [ ] [Run test](https://kyuubi.readthedocs.io/en/latest/develop_tools/testing.html#running-tests) locally before make a pull request
   


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

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



[GitHub] [incubator-kyuubi] ulysses-you commented on a change in pull request #1474: [KYUUBI #1473] Exit gracefully when engine idle

Posted by GitBox <gi...@apache.org>.
ulysses-you commented on a change in pull request #1474:
URL: https://github.com/apache/incubator-kyuubi/pull/1474#discussion_r759225623



##########
File path: externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/SparkSQLEngine.scala
##########
@@ -54,7 +54,12 @@ case class SparkSQLEngine(
     super.start()
     // Start engine self-terminating checker after all services are ready and it can be reached by
     // all servers in engine spaces.
-    backendService.sessionManager.startTerminatingChecker()
+    backendService.sessionManager.startTerminatingChecker(() => {
+      currentEngine match {

Review comment:
       if we go into here that means the `currentEngine` has already initialized. I think we can do:
   ```java
   assert(currentEngine.isDefined)
   currentEngine.get.stop()
   ```




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

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



[GitHub] [incubator-kyuubi] ulysses-you commented on pull request #1474: [KYUUBI #1473] Exit gracefully when engine idle

Posted by GitBox <gi...@apache.org>.
ulysses-you commented on pull request #1474:
URL: https://github.com/apache/incubator-kyuubi/pull/1474#issuecomment-983199223


   thanks, merging to master


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

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



[GitHub] [incubator-kyuubi] ulysses-you closed pull request #1474: [KYUUBI #1473] Exit gracefully when engine idle

Posted by GitBox <gi...@apache.org>.
ulysses-you closed pull request #1474:
URL: https://github.com/apache/incubator-kyuubi/pull/1474


   


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

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



[GitHub] [incubator-kyuubi] cxzl25 commented on pull request #1474: [KYUUBI #1473] Exit gracefully when engine idle

Posted by GitBox <gi...@apache.org>.
cxzl25 commented on pull request #1474:
URL: https://github.com/apache/incubator-kyuubi/pull/1474#issuecomment-982638386


   # current
   ![image](https://user-images.githubusercontent.com/3898450/144055976-dcc36d6c-1118-4b63-aa23-05339e6e5a0c.png)
   # fix
   ![image](https://user-images.githubusercontent.com/3898450/144056109-2099ac09-1eb3-42e5-b611-2640ccea8000.png)
   
   


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

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



[GitHub] [incubator-kyuubi] ulysses-you edited a comment on pull request #1474: [KYUUBI #1473] Exit gracefully when engine idle

Posted by GitBox <gi...@apache.org>.
ulysses-you edited a comment on pull request #1474:
URL: https://github.com/apache/incubator-kyuubi/pull/1474#issuecomment-983199223


   thanks, merging to master/branch-1.4


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

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