Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Not graceful exit when engine idle #1473

Closed
3 tasks done
cxzl25 opened this issue Nov 30, 2021 · 0 comments
Closed
3 tasks done

[Bug] Not graceful exit when engine idle #1473

cxzl25 opened this issue Nov 30, 2021 · 0 comments

Comments

@cxzl25
Copy link
Contributor

cxzl25 commented Nov 30, 2021

Code of Conduct

Search before asking

  • I have searched in the issues and found no similar issues.

Describe the bug

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.

21/11/30 18:35:00 INFO yarn.ApplicationMaster: Final app status: FAILED, exitCode: 16, (reason: Shutdown hook called before final status was reported.)

Affects Version(s)

master

Kyuubi Server Log Output

No response

Kyuubi Engine Log Output

21/11/30 18:34:50 INFO session.SparkSQLSessionManager: Idled for more than 1800000 ms, terminating
21/11/30 18:34:50 INFO handler.ContextHandler: Stopped o.s.j.s.ServletContextHandler@4a134605{/kyuubi,null,STOPPED,@Spark}
21/11/30 18:34:50 INFO handler.ContextHandler: Stopped o.s.j.s.ServletContextHandler@6d44ce3f{/kyuubi/json,null,STOPPED,@Spark}
21/11/30 18:34:50 INFO handler.ContextHandler: Stopped o.s.j.s.ServletContextHandler@671a6a5{/kyuubi/session,null,STOPPED,@Spark}
21/11/30 18:34:50 INFO handler.ContextHandler: Stopped o.s.j.s.ServletContextHandler@39db6d9f{/kyuubi/session/json,null,STOPPED,@Spark}
21/11/30 18:34:50 INFO spark.SparkSQLEngine: Service: [SparkThriftBinaryFrontendService] is stopping.
21/11/30 18:34:50 INFO spark.SparkThriftBinaryFrontendService: SparkThriftBinaryFrontendService has stopped
21/11/30 18:34:50 INFO spark.SparkThriftBinaryFrontendService: Service: [EngineServiceDiscovery] is stopping.

21/11/30 18:34:50 INFO client.EngineServiceDiscovery: Service[EngineServiceDiscovery] is stopped.
21/11/30 18:34:50 INFO spark.SparkThriftBinaryFrontendService: Service[SparkThriftBinaryFrontendService] is stopped.
21/11/30 18:34:50 INFO spark.SparkSQLEngine: Service: [SparkSQLBackendService] is stopping.
21/11/30 18:34:50 INFO spark.SparkSQLBackendService: Service: [SparkSQLSessionManager] is stopping.
21/11/30 18:34:50 INFO session.SparkSQLSessionManager: Service: [SparkSQLOperationManager] is stopping.
21/11/30 18:34:50 INFO operation.SparkSQLOperationManager: Service[SparkSQLOperationManager] is stopped.
21/11/30 18:34:50 INFO session.SparkSQLSessionManager: Service[SparkSQLSessionManager] is stopped.
21/11/30 18:34:50 WARN client.EngineServiceDiscovery: Service[EngineServiceDiscovery] is not started(STOPPED) yet.
21/11/30 18:35:00 INFO spark.SparkSQLBackendService: Service[SparkSQLBackendService] is stopped.
21/11/30 18:35:00 INFO spark.SparkSQLEngine: Service[SparkSQLEngine] is stopped.
21/11/30 18:35:00 INFO events.EventLoggingService: Service[EventLogging] is stopped.
21/11/30 18:35:00 INFO zookeeper.ClientCnxn: EventThread shut down for session: 0x57c736b4fff0649
21/11/30 18:35:00 INFO yarn.ApplicationMaster: Final app status: FAILED, exitCode: 16, (reason: Shutdown hook called before final status was reported.)
21/11/30 18:35:00 INFO storage.DiskBlockManager: Shutdown hook called

Kyuubi Server Configurations

No response

Kyuubi Engine Configurations

No response

Additional context

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!
@cxzl25 cxzl25 added the bug label Nov 30, 2021
@cxzl25 cxzl25 changed the title [Bug] [Bug] Not graceful exit when engine idle Nov 30, 2021
ulysses-you pushed a commit that referenced this issue Dec 1, 2021
### _Why are the changes needed?_
#1473

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

- [x] 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

Closes #1474 from cxzl25/KYUUBI-1473.

Closes #1473

dc07b38 [sychen] assert engine
6df54eb [sychen] Exit gracefully when engine idle

Authored-by: sychen <sychen@trip.com>
Signed-off-by: ulysses-you <ulyssesyou@apache.org>
(cherry picked from commit 4bf17a2)
Signed-off-by: ulysses-you <ulyssesyou@apache.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant