apache/spark — pull request #2145 by liancheng (2014-08-26 19:55:29+00:00)
Title: [SPARK-2608][Core] Fixed command line option passing issue over Mesos

This PR is based on #1986, authored by @scwf.

The basic idea is to start Mesos executors directly with `java` (similar to what we do for standalone executors). This PR is different from #1986 in two major aspects:

1. Environment variables in `sc.executorEnvs` are properly set for Mesos executors
2. `PYTHONPATH` is properly set for fine grained Mesos executors by calling `sbin/mesos-pyenv.sh`

`sbin/spark-executor` is renamed to `sbin/mesos-pyenv.sh` since it's only responsible for setting `PYTHONPATH` now, and the executor is started by `MesosSchedulerBackend` after the change.