mesos/spark — pull request #540 by cgrothaus (2013-03-22 10:21:31+00:00)
Title: Shutdown StandaloneExecutorBackend properly in non-error case by sending...

... a termination message instead of calling process.destroy.

This gives the executor process the chance to properly clean up after itself. E.g. spark.Utils.createTempDir() registers a JVM shutdown hook per created dir. These get never executed if we terminate the executor via process.destroy, so I think sending a termination message is the nicer way, at least in the good case. In an error case - e.g. the executor not reacting anymore - we can still stick with the destroy method.