title: object HiveContext in package hive cannot be accessed in package
body: <p><strong>HI Coders,
  I'm back again. I'm trying to create a hive table from a dataframe using HIve context in my scala code, im able to do it in sqlContext but when it comes to HiveContext, it is throwing this error</strong></p>
  
  <pre><code>[error] /home/mapr/avroProject/src/main/scala/AvroConsumer.scala:75: object HiveContext in package hive cannot be accessed in package org.apa                                                che.spark.sql.hive
  [error] HiveContext sqlContext = new org.apache.spark.sql.hive.HiveContext(sc.sc());
  </code></pre>
  
  <p>I've tried the same with slightly different declarations as well,</p>
  
  <pre><code>val hiveContext = org.apache.spark.sql.hive.HiveContext(sc)
  </code></pre>
  
  <p>I have added the sbt library dependenccies too,</p>
  
  <blockquote>
    <p>libraryDependencies += "org.apache.spark" % "spark-hive_2.10" %
    "1.6.1"</p>
  </blockquote>
  
  <p><strong>i tried with "provided" also.</strong></p>
  
  <p><strong>Here is my piece of code</strong></p>
  
  <pre><code> messages.foreachRDD(rdd=&gt;
  {
   import org.apache.spark.sql.hive.HiveContext
  HiveContext sqlContext = new org.apache.spark.sql.hive.HiveContext(sc.sc());
  //import org.apache.spark.sql.hive._
  //val dataframe = sqlContext.read.json(rdd.map(_._2))
  val dataframe =sqlContext.read.json(rdd.map(_._2))
  val df =dataframe.toDF()
  </code></pre>
  
  <p><strong>Any fix on this? I've never came across this "not accessible" error.</strong></p>
  
  <p><strong>And also i tried to create a temptable from the code</strong></p>
  
  <pre><code>val dataframe =sqlContext.read.json(rdd.map(_._2))
   val df =dataframe.toDF()
    df.registerTempTable("mdl_events")
  </code></pre>
  
  <p><strong>But where could i find the mdl_events table? is there any default database in spark where i can look for this? I cannot fond from spark shell though.</strong></p>