<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: HDP 2.5.3 spark-submit sparkSQL, not able to instantiate metadata error in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/HDP-2-5-3-spark-submit-sparkSQL-not-able-to-instantiate/m-p/159898#M49238</link>
    <description>&lt;P&gt;Hi &lt;A rel="user" href="https://community.cloudera.com/users/10425/wangliefu.html" nodeid="10425"&gt;@Sherry Noah&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Can you try:&lt;/P&gt;&lt;PRE&gt;spark-submit \
--classSparkSamplePackage.SparkSampleClass \
--master yarn-cluster \
--num-executors 2 \
--driver-memory 1g \
--executor-memory 1g \
--executor-cores 1 \
--files /usr/hdp/current/spark-client/conf/hive-site.xml \    
--jars /usr/hdp/current/spark-client/lib/datanucleus-api-jdo-3.2.6.jar,/usr/hdp/current/spark-client/lib/datanucleus-rdbms-3.2.9.jar,/usr/hdp/current/spark-client/lib/datanucleus-core-3.2.10.jar,target/SparkSample-1.0-SNAPSHOT.jar&lt;/PRE&gt;</description>
    <pubDate>Sun, 18 Dec 2016 04:30:43 GMT</pubDate>
    <dc:creator>RyanCicak</dc:creator>
    <dc:date>2016-12-18T04:30:43Z</dc:date>
    <item>
      <title>HDP 2.5.3 spark-submit sparkSQL, not able to instantiate metadata error</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/HDP-2-5-3-spark-submit-sparkSQL-not-able-to-instantiate/m-p/159897#M49237</link>
      <description>&lt;P&gt;Create a Spark applicaiton with SparkSQL inside&lt;/P&gt;&lt;PRE&gt;package SparkSamplePackage

import org.apache.spark.SparkContext
import org.apache.spark.SparkContext._
import org.apache.spark.SparkConf
import org.apache.spark.sql._
import org.apache.spark.sql.hive._

object SparkSampleClass
{
        def main(args: Array[String]) {

        val conf = new SparkConf().setAppName("Spark Sample App")
        conf.set("spark.serializer","org.apache.spark.serializer.KryoSerializer")
        conf.set("spark.sepeculation","true")


        val sc = new SparkContext(conf)
        val sqlContext = new org.apache.spark.sql.hive.HiveContext(sc)
        import sqlContext.implicits._

        val sampleDF = sqlContext.sql("select code, salary from hr.managers limit 10")
        sampleDF.collect.foreach(println)

        sc.stop()
        }
}
&lt;/PRE&gt;&lt;P&gt;spark-submit command looks like. Cluster is with latest HDP 2.5.3, spark is 1.6.2 &lt;/P&gt;&lt;PRE&gt;spark-submit \
  --class SparkSamplePackage.SparkSampleClass \
  --master yarn-cluster \
  --num-executors 2 \
  --driver-memory 1g \
  --executor-memory 1g \
  --executor-cores 1 \
  --files /usr/hdp/current/spark-client/conf/hive-site.xml \
    target/SparkSample-1.0-SNAPSHOT.jar
&lt;/PRE&gt;&lt;P&gt;Getting following error complaining that not able to instantiate metadata&lt;/P&gt;&lt;PRE&gt;client token: Token { kind: YARN_CLIENT_TOKEN, service:  }
	 diagnostics: User class threw exception: java.lang.RuntimeException: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient
&lt;/PRE&gt;&lt;P&gt;Please advise on how to address the issue.&lt;/P&gt;</description>
      <pubDate>Sun, 18 Dec 2016 04:20:06 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/HDP-2-5-3-spark-submit-sparkSQL-not-able-to-instantiate/m-p/159897#M49237</guid>
      <dc:creator>__anonymous__</dc:creator>
      <dc:date>2016-12-18T04:20:06Z</dc:date>
    </item>
    <item>
      <title>Re: HDP 2.5.3 spark-submit sparkSQL, not able to instantiate metadata error</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/HDP-2-5-3-spark-submit-sparkSQL-not-able-to-instantiate/m-p/159898#M49238</link>
      <description>&lt;P&gt;Hi &lt;A rel="user" href="https://community.cloudera.com/users/10425/wangliefu.html" nodeid="10425"&gt;@Sherry Noah&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Can you try:&lt;/P&gt;&lt;PRE&gt;spark-submit \
--classSparkSamplePackage.SparkSampleClass \
--master yarn-cluster \
--num-executors 2 \
--driver-memory 1g \
--executor-memory 1g \
--executor-cores 1 \
--files /usr/hdp/current/spark-client/conf/hive-site.xml \    
--jars /usr/hdp/current/spark-client/lib/datanucleus-api-jdo-3.2.6.jar,/usr/hdp/current/spark-client/lib/datanucleus-rdbms-3.2.9.jar,/usr/hdp/current/spark-client/lib/datanucleus-core-3.2.10.jar,target/SparkSample-1.0-SNAPSHOT.jar&lt;/PRE&gt;</description>
      <pubDate>Sun, 18 Dec 2016 04:30:43 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/HDP-2-5-3-spark-submit-sparkSQL-not-able-to-instantiate/m-p/159898#M49238</guid>
      <dc:creator>RyanCicak</dc:creator>
      <dc:date>2016-12-18T04:30:43Z</dc:date>
    </item>
    <item>
      <title>Re: HDP 2.5.3 spark-submit sparkSQL, not able to instantiate metadata error</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/HDP-2-5-3-spark-submit-sparkSQL-not-able-to-instantiate/m-p/159899#M49239</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/3584/rcicak.html" nodeid="3584"&gt;@Ryan Cicak&lt;/A&gt; Yes, it works. Thx&lt;/P&gt;</description>
      <pubDate>Sun, 18 Dec 2016 04:35:50 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/HDP-2-5-3-spark-submit-sparkSQL-not-able-to-instantiate/m-p/159899#M49239</guid>
      <dc:creator>__anonymous__</dc:creator>
      <dc:date>2016-12-18T04:35:50Z</dc:date>
    </item>
  </channel>
</rss>

