apache/spark — pull request #1715 by liancheng (2014-08-01 10:34:45+00:00)
Title: [SPARK-2678][Core] Added "--" to prevent spark-submit from shadowing application options

JIRA issue: [SPARK-2678](https://issues.apache.org/jira/browse/SPARK-2678)

This PR aims to fix SPARK-2678 in a downward compatible way, and replaces PR #1699.

All arguments that follow a `--` are passed to user application. Before this change, `spark-submit` shadows application options:

```bash
# The "--help" option is captured by spark-submit
bin/spark-submit --class Foo userapp.jar --help
```

With the help of `--`, we can pass arbitrary options to user application:

```bash
# The "--help" option is now passed to userapp.jar
bin/spark-submit --class Foo userapp.jar -- --help
```