mozilla / jydoop

Efficient Hadoop Map-Reduce in Python
Other
31 stars 19 forks source link

ctrl+c of job should abort job #28

Closed indygreg closed 11 years ago

indygreg commented 11 years ago

Currently if I hit ctrl+c during a |make ARGS="..." hadoop| the hadoop job keeps running in the background. It feels unexpected to hit ctrl+c and not have the job aborted.

I'm not sure if this is the default behavior of Hadoop or if running hadoop through make is causing weirdness here. If it's make, fixing this may involve not running jobs through make :/

tarasglek commented 11 years ago

It should, but I'm not sure how to implement it. Version of pig deployed by metrics also doesn't implement this (i think). Newer ones do. If you can figure this out, send a pull request

bsmedberg commented 11 years ago

I think this can be implemented using sun.misc.Signal and replace job.waitForCompletion with job.submit and some kind of loop that waits for completion or something. I'm not sure what the "something" is that doesn't involve a busyloop.