ammonite-spark icon indicating copy to clipboard operation
ammonite-spark copied to clipboard

Better CTRL+C handling

Open benwbooth opened this issue 6 years ago • 1 comments

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.

benwbooth avatar Dec 20 '18 17:12 benwbooth

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().

alexarchambault avatar Dec 20 '18 17:12 alexarchambault