Even if it's a hack / workaround, I think it's probably better to work with the assumption that it'll end up sticking around for a while.  With that in mind, a system property that signifies we started something from spark-submit makes more sense to me than a system property that signifying we started from spark-submit AND happen to be running YARN.  Especially if we'll need a similar one for standalone mode.  Do you think SPARK_SUBMIT_YARN would be less likely to be abused than SPARK_SUBMIT?

That said, it's a tiny issue, and I don't feel super strongly, so if you feel differently, go ahead with the current patch.