title: error: not found: value sqlContext on EMR
body: <p>I am on EMR using Spark 2. When I ssh into the master node and run spark-shell I can't see to have access to <code>sqlContext</code>. Is there something I'm missing? </p>
  
  <pre><code>[hadoop@ip-172-31-13-180 ~]$ spark-shell
  Setting default log level to "WARN".
  To adjust logging level use sc.setLogLevel(newLevel).
  16/11/10 21:07:05 WARN Client: Neither spark.yarn.jars nor spark.yarn.archive is set, falling back to uploading libraries under SPARK_HOME.
  16/11/10 21:07:14 WARN SparkContext: Use an existing SparkContext, some configuration may not take effect.
  Spark context Web UI available at http://172.31.13.180:4040
  Spark context available as 'sc' (master = yarn, app id = application_1478720853870_0003).
  Spark session available as 'spark'.
  Welcome to
        ____              __
       / __/__  ___ _____/ /__
      _\ \/ _ \/ _ `/ __/  '_/
     /___/ .__/\_,_/_/ /_/\_\   version 2.0.1
        /_/
  
  Using Scala version 2.11.8 (OpenJDK 64-Bit Server VM, Java 1.8.0_111)
  Type in expressions to have them evaluated.
  Type :help for more information.
  
  scala&gt; import org.apache.spark.sql.SQLContext
  import org.apache.spark.sql.SQLContext
  
  scala&gt; sqlContext
  &lt;console&gt;:25: error: not found: value sqlContext
         sqlContext
         ^
  </code></pre>
  
  <p>Since I'm getting same error on my local computer I've tried the following to no avail:</p>
  
  <p><strong>exported SPARK_LOCAL_IP</strong></p>
  
  <pre><code>➜  play grep "SPARK_LOCAL_IP" ~/.zshrc
  export SPARK_LOCAL_IP=127.0.0.1
  ➜  play source ~/.zshrc
  ➜  play spark-shell
  Using Spark's default log4j profile: org/apache/spark/log4j-defaults.properties
  Setting default log level to "WARN".
  To adjust logging level use sc.setLogLevel(newLevel).
  16/11/10 16:12:18 WARN NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
  16/11/10 16:12:19 WARN SparkContext: Use an existing SparkContext, some configuration may not take effect.
  Spark context Web UI available at http://127.0.0.1:4040
  Spark context available as 'sc' (master = local[*], app id = local-1478812339020).
  Spark session available as 'spark'.
  Welcome to
        ____              __
       / __/__  ___ _____/ /__
      _\ \/ _ \/ _ `/ __/  '_/
     /___/ .__/\_,_/_/ /_/\_\   version 2.0.1
        /_/
  
  Using Scala version 2.11.8 (Java HotSpot(TM) 64-Bit Server VM, Java 1.7.0_79)
  Type in expressions to have them evaluated.
  Type :help for more information.
  
  scala&gt; sqlContext
  &lt;console&gt;:24: error: not found: value sqlContext
         sqlContext
         ^
  
  scala&gt;
  </code></pre>
  
  <p>My <code>/etc/hosts</code> contains the following</p>
  
  <pre><code>127.0.0.1       localhost
  255.255.255.255 broadcasthost
  ::1             localhost
  </code></pre>