How to use two versions of spark shell?
<p>I have <strong>Spark 1.6.2</strong> and <strong>Spark 2.0</strong> installed on my hortonworks cluster.</p>

<p>Both these versions are installed on a node in the Hadoop Cluster of 5 nodes.</p>

<p>Each time I start the <code>spark-shell</code> I get:</p>

<pre><code>$ spark-shell
Multiple versions of Spark are installed but SPARK_MAJOR_VERSION is not set
Spark1 will be picked by default
</code></pre>

<p>When I check the version I get:</p>

<pre><code>scala&gt; sc.version
res0: String = 1.6.2
</code></pre>

<p>How can I start the other version(spark-shell of Spark2.0)?</p>