ammonite-spark
ammonite-spark copied to clipboard
Better CTRL+C handling
In normal spark shell, pressing CTRL+C once will attempt to cancel the currently running spark job. I know in the past pressing CTRL+C in Ammonite would use thread.stop() to kill the currently running computation. That doesn't seem to be the case anymore, it seems like CTRL+C is simply ignored now. It would be nice if some basic CTRL+C handling could be implemented. Pressing CTRL+C once should attempt to stop the currently running spark job. Pressing it again should run thread.stop() to kill the currently running computation.
Yep, I confirm it behaves this way currently, and I agree this ought to be fixed… (There's the same problem in Jupyter classic, when one clicks on the stop button.)
It might require extending the API of Ammonite, so that one can add extra handlers, called along the Thread.stop().