<?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 [Error]:Accessing  hbase table with Spark's HiveContext in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Error-Accessing-hbase-table-with-Spark-s-HiveContext/m-p/105424#M21561</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have registered the hive external table on hbase table.&lt;/P&gt;&lt;P&gt;When I try to access that through hiveContext &lt;/P&gt;&lt;P&gt;getting below error &lt;/P&gt;&lt;PRE&gt;org.apache.spark.SparkException: Job aborted due to stage failure: Task 0 in sta        ge 0.0 failed 4 times, most recent failure: Lost task 0.3 in stage 0.0 (TID 3, i        p-172-31-29-201.ap-southeast-1.compute.internal): java.lang.RuntimeException: hb        ase-default.xml file seems to be for an older version of HBase (null), this vers        ion is 1.1.2.2.3.4.0-3485
        at org.apache.hadoop.hbase.HBaseConfiguration.checkDefaultsVersion(HBase        Configuration.java:71)
        at org.apache.hadoop.hbase.HBaseConfiguration.addHbaseResources(HBaseCon        figuration.java:81)&lt;/PRE&gt;&lt;P&gt;I have already placed  hbase-default.xml ,hbase-site.xml in spark/conf by setting the below property to true&lt;/P&gt;&lt;PRE&gt; &amp;lt;property&amp;gt;
    &amp;lt;name&amp;gt;hbase.defaults.for.version.skip&amp;lt;/name&amp;gt;
    &amp;lt;value&amp;gt;true&amp;lt;/value&amp;gt;
    &amp;lt;description&amp;gt;Set to true to skip the 'hbase.defaults.for.version' check.
    Setting this to true can be useful in contexts other than
    the other side of a maven generation; i.e. running in an
    IDE.  You'll want to set this boolean to true to avoid
    seeing the RuntimeException complaint: "hbase-default.xml file
    seems to be for and old version of HBase (\${hbase.version}), this
    version is X.X.X-SNAPSHOT"&amp;lt;/description&amp;gt;
  &amp;lt;/property&amp;gt;&lt;/PRE&gt;&lt;P&gt;Spark code :&lt;/P&gt;&lt;PRE&gt;import org.apache.spark.sql.hive.HiveContextval hiveContext = new HiveContext(sc)val df = hiveContext.sql("select * from test")df.show&lt;/PRE&gt;&lt;P&gt;Adding these jars while submitting starting spark shell&lt;/P&gt;&lt;PRE&gt;/usr/hdp/2.3.4.0-3485/hive/lib/guava-14.0.1.jar
/usr/hdp/2.3.4.0-3485/hive/lib/hive-hbase-handler-1.2.1.2.3.4.0-3485.jar
/usr/hdp/2.3.4.0-3485/hive/lib/htrace-core-3.1.0-incubating.jar,
/usr/hdp/2.3.4.0-3485/hive/lib/zookeeper-3.4.6.2.3.4.0-3485.jar,
/usr/hdp/2.3.4.0-3485/hbase/lib/hbase-client-1.1.2.2.3.4.0-3485.jar
/usr/hdp/2.3.4.0-3485/hbase/lib/hbase-common-1.1.2.2.3.4.0-3485.jar
/usr/hdp/2.3.4.0-3485/hbase/lib/hbase-protocol-1.1.2.2.3.4.0-3485.jar
/usr/hdp/2.3.4.0-3485/hbase/lib/hbase-server-1.1.2.2.3.4.0-3485.jar&lt;/PRE&gt;</description>
    <pubDate>Wed, 02 Mar 2016 11:09:42 GMT</pubDate>
    <dc:creator>DivyaGehlot13</dc:creator>
    <dc:date>2016-03-02T11:09:42Z</dc:date>
    <item>
      <title>[Error]:Accessing  hbase table with Spark's HiveContext</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Error-Accessing-hbase-table-with-Spark-s-HiveContext/m-p/105424#M21561</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have registered the hive external table on hbase table.&lt;/P&gt;&lt;P&gt;When I try to access that through hiveContext &lt;/P&gt;&lt;P&gt;getting below error &lt;/P&gt;&lt;PRE&gt;org.apache.spark.SparkException: Job aborted due to stage failure: Task 0 in sta        ge 0.0 failed 4 times, most recent failure: Lost task 0.3 in stage 0.0 (TID 3, i        p-172-31-29-201.ap-southeast-1.compute.internal): java.lang.RuntimeException: hb        ase-default.xml file seems to be for an older version of HBase (null), this vers        ion is 1.1.2.2.3.4.0-3485
        at org.apache.hadoop.hbase.HBaseConfiguration.checkDefaultsVersion(HBase        Configuration.java:71)
        at org.apache.hadoop.hbase.HBaseConfiguration.addHbaseResources(HBaseCon        figuration.java:81)&lt;/PRE&gt;&lt;P&gt;I have already placed  hbase-default.xml ,hbase-site.xml in spark/conf by setting the below property to true&lt;/P&gt;&lt;PRE&gt; &amp;lt;property&amp;gt;
    &amp;lt;name&amp;gt;hbase.defaults.for.version.skip&amp;lt;/name&amp;gt;
    &amp;lt;value&amp;gt;true&amp;lt;/value&amp;gt;
    &amp;lt;description&amp;gt;Set to true to skip the 'hbase.defaults.for.version' check.
    Setting this to true can be useful in contexts other than
    the other side of a maven generation; i.e. running in an
    IDE.  You'll want to set this boolean to true to avoid
    seeing the RuntimeException complaint: "hbase-default.xml file
    seems to be for and old version of HBase (\${hbase.version}), this
    version is X.X.X-SNAPSHOT"&amp;lt;/description&amp;gt;
  &amp;lt;/property&amp;gt;&lt;/PRE&gt;&lt;P&gt;Spark code :&lt;/P&gt;&lt;PRE&gt;import org.apache.spark.sql.hive.HiveContextval hiveContext = new HiveContext(sc)val df = hiveContext.sql("select * from test")df.show&lt;/PRE&gt;&lt;P&gt;Adding these jars while submitting starting spark shell&lt;/P&gt;&lt;PRE&gt;/usr/hdp/2.3.4.0-3485/hive/lib/guava-14.0.1.jar
/usr/hdp/2.3.4.0-3485/hive/lib/hive-hbase-handler-1.2.1.2.3.4.0-3485.jar
/usr/hdp/2.3.4.0-3485/hive/lib/htrace-core-3.1.0-incubating.jar,
/usr/hdp/2.3.4.0-3485/hive/lib/zookeeper-3.4.6.2.3.4.0-3485.jar,
/usr/hdp/2.3.4.0-3485/hbase/lib/hbase-client-1.1.2.2.3.4.0-3485.jar
/usr/hdp/2.3.4.0-3485/hbase/lib/hbase-common-1.1.2.2.3.4.0-3485.jar
/usr/hdp/2.3.4.0-3485/hbase/lib/hbase-protocol-1.1.2.2.3.4.0-3485.jar
/usr/hdp/2.3.4.0-3485/hbase/lib/hbase-server-1.1.2.2.3.4.0-3485.jar&lt;/PRE&gt;</description>
      <pubDate>Wed, 02 Mar 2016 11:09:42 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Error-Accessing-hbase-table-with-Spark-s-HiveContext/m-p/105424#M21561</guid>
      <dc:creator>DivyaGehlot13</dc:creator>
      <dc:date>2016-03-02T11:09:42Z</dc:date>
    </item>
    <item>
      <title>Re: [Error]:Accessing  hbase table with Spark's HiveContext</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Error-Accessing-hbase-table-with-Spark-s-HiveContext/m-p/105425#M21562</link>
      <description>&lt;P&gt;Able to resolve it as missing one of the jars files &lt;/P&gt;&lt;P&gt;hbase-hadoop-compat.jar:&lt;/P&gt;</description>
      <pubDate>Fri, 04 Mar 2016 10:39:49 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Error-Accessing-hbase-table-with-Spark-s-HiveContext/m-p/105425#M21562</guid>
      <dc:creator>DivyaGehlot13</dc:creator>
      <dc:date>2016-03-04T10:39:49Z</dc:date>
    </item>
  </channel>
</rss>

