title: How to set a config parameter to a specific value in the interactive shell (Spark 2.0.1)
body: <p>I want to set a config parameter to a specific value <em>in the interactive shell</em> (Spark 2.0.1). I know that I can set this parameter when invoking the spark-shell. For example:</p>
  
  <pre><code>] $SPARK_HOME/bin/spark-shell --master local[4] --conf spark.es.resource="myindex/mytype"
  </code></pre>
  
  <p>What I want instead is to set this value inside the shell. The command:</p>
  
  <pre><code>scala&gt; spark.conf.set("spark.es.resource","myindex/mytype")
  </code></pre>
  
  <p>does not seem to set the <em>real</em> parameter spark.es.resource because subsequent call to spark.read.format (that makes use of the resource value) crashes. It works if I set the parameter outside the shell.</p>