Override cluster url when spark-submitting
<p>I wrote a Spark application that is packaged by SBT as a JAR. The JAR shall be deployed on a cluster. I also want to be able to run the program with <code>sbt run</code> in local mode. Currently I use </p>

<pre><code>val spark = SparkSession
      .builder
      .master(args(0))
      .getOrCreate()
</code></pre>

<p>to create my <code>SparkSession</code>. Can I just write <code>.master("local")</code> and override the <code>"local"</code> by using <code>--master myclusterurl</code> in my <code>./bin/spark-submit</code> command?</p>