Commit c4b954c
[query] Daemonize Py4JQueryDriver http server (hail-is#15050)
PR hail-is#14698 refactored the startup of the py4j http server so that calling
`pyHttpServer` created and started the sever. In the process, it deleted
the daemon thread that the server was started from originally. This
caused the `httpServer.start` method to spawn a non-daemon thread as it
was being called from the main thread py4j was using to do its work.
Simply calling `setExecutor(null)` is not sufficent for this purpose.
Manually stopping the server, like with `hl.stop()` would solve the
issue since the JVM would exit and spark would note that the job was
complete after the python process exited as well.
We once again create a thread that itself starts the http server, and
then start that thread in `pyHttpServer`.
This should solve the hanging in dataproc that bisection showed was
introduced in hail-is#14698.
## Security Assessment
- This change cannot impact the Hail Batch instance as deployed by Broad
Institute in GCP1 parent 4f1065a commit c4b954c
1 file changed
+21
-4
lines changedLines changed: 21 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
403 | 403 | | |
404 | 404 | | |
405 | 405 | | |
| 406 | + | |
406 | 407 | | |
407 | 408 | | |
408 | 409 | | |
409 | 410 | | |
410 | 411 | | |
411 | 412 | | |
412 | | - | |
413 | | - | |
| 413 | + | |
| 414 | + | |
414 | 415 | | |
415 | 416 | | |
416 | 417 | | |
417 | 418 | | |
418 | 419 | | |
419 | 420 | | |
420 | 421 | | |
421 | | - | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
422 | 431 | | |
423 | | - | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
424 | 441 | | |
425 | 442 | | |
0 commit comments