title: How to update existing SparkSession instance or create a new one in spark-shell?
body: <p>When I launch <code>spark-shell</code>, it creates an instance of <code>SparkSession</code>. However, I should create it as follows:</p>
  
  <pre><code>val spark = SparkSession.builder()
                          .config("es.nodes",elasticHost)
                          .config("es.port",elasticPort)
                          .config("es.nodes.wan.only","true")
                          .appName("Test")
                          .getOrCreate()
  </code></pre>
  
  <p>How can I update the existing <code>spark</code> in <code>spark-shell</code> or create the new one as I showed above?</p>