Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[KYUUBI #4644] Manually terminate the Py4JServer during engine shutdown
### _Why are the changes needed?_ Due to the Py4JServer initiating with a non-daemon thread, there is a possibility of it impeding the engine's termination. Therefore, it is imperative to manually terminate the Py4JServer during engine shutdown. ``` "Thread-23" #96 prio=5 os_prio=0 cpu=7.93ms elapsed=187532.67s tid=0x00007fee840cf000 nid=0x8f runnable [0x00007fedca6bf000] java.lang.Thread.State: RUNNABLE at java.net.PlainSocketImpl.socketAccept(java.base11.0.16/Native Method) at java.net.AbstractPlainSocketImpl.accept(java.base11.0.16/Unknown Source) at java.net.ServerSocket.implAccept(java.base11.0.16/Unknown Source) at java.net.ServerSocket.accept(java.base11.0.16/Unknown Source) at py4j.GatewayServer.run(GatewayServer.java:685) at java.lang.Thread.run(java.base11.0.16/Unknown Source) ``` ### _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 - [x] [Run test](https://kyuubi.readthedocs.io/en/master/develop_tools/testing.html#running-tests) locally before make a pull request Closes #4644 from cfmcgrady/pyserver-non-daemon. Closes #4644 d4f1a57 [Fu Chen] synchronized cdc9630 [Fu Chen] shutdown Py4JServer Authored-by: Fu Chen <cfmcgrady@gmail.com> Signed-off-by: Cheng Pan <chengpan@apache.org>
- Loading branch information