<?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: Hive HBase snapshot query results in exception in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-HBase-snapshot-query-results-in-exception/m-p/32045#M7160</link>
    <description>The snapshot read path uses a few more jars than the default table read path code does, and the error suggests that at least one such extra jar is not on the default set of aux-jars pre-added for Hive-HBase integration in CDH.&lt;BR /&gt;&lt;BR /&gt;You will need to do an "ADD JAR /opt/cloudera/parcels/CDH/lib/hbase/lib/metrics-core-2.2.0.jar;" to get this required class on the Hive CLI classpath.</description>
    <pubDate>Sun, 20 Sep 2015 14:56:00 GMT</pubDate>
    <dc:creator>Harsh J</dc:creator>
    <dc:date>2015-09-20T14:56:00Z</dc:date>
    <item>
      <title>Hive HBase snapshot query results in exception</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-HBase-snapshot-query-results-in-exception/m-p/31323#M7159</link>
      <description>&lt;P&gt;Hi, we are using CDH5.4.4 and I am trying to use Hive to query HBase snapshots. But when I issue a query I am getting the following exception in the hive CLI&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;Failed with exception java.io.IOException:java.io.IOException: java.lang.NoClassDefFoundError: com/yammer/metrics/core/MetricsRegistry&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here are the steps I took&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. Created an HBase snapshot '&lt;EM&gt;snapshot_20150827&lt;/EM&gt;'&lt;/P&gt;&lt;P&gt;2. In Hive CLI executed the following&lt;/P&gt;&lt;P&gt;a. Create external table&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;EM&gt;CREATE EXTERNAL TABLE e(id STRING,.....) STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WITH SERDEPROPERTIES ("hbase.columns.mapping" = ":key,....") &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TBLPROPERTIES ("hbase.table.name" = "e",&amp;nbsp; "hbase.table.default.storage.type" = "binary")&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;b. &lt;EM&gt;SET hive.hbase.snapshot.name=snapshot_20150827;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;c.&amp;nbsp; Execute the query&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;EM&gt;select * from e where id = '...';&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and this gives me the exception noted above, please help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Nitin&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 09:39:24 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-HBase-snapshot-query-results-in-exception/m-p/31323#M7159</guid>
      <dc:creator>NitinA</dc:creator>
      <dc:date>2022-09-16T09:39:24Z</dc:date>
    </item>
    <item>
      <title>Re: Hive HBase snapshot query results in exception</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-HBase-snapshot-query-results-in-exception/m-p/32045#M7160</link>
      <description>The snapshot read path uses a few more jars than the default table read path code does, and the error suggests that at least one such extra jar is not on the default set of aux-jars pre-added for Hive-HBase integration in CDH.&lt;BR /&gt;&lt;BR /&gt;You will need to do an "ADD JAR /opt/cloudera/parcels/CDH/lib/hbase/lib/metrics-core-2.2.0.jar;" to get this required class on the Hive CLI classpath.</description>
      <pubDate>Sun, 20 Sep 2015 14:56:00 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-HBase-snapshot-query-results-in-exception/m-p/32045#M7160</guid>
      <dc:creator>Harsh J</dc:creator>
      <dc:date>2015-09-20T14:56:00Z</dc:date>
    </item>
    <item>
      <title>Re: Hive HBase snapshot query results in exception</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-HBase-snapshot-query-results-in-exception/m-p/32064#M7161</link>
      <description>&lt;P&gt;Thanks for the reply Harsh. But that did not help. I tried ADD JAR but still getting the same error. Here is what I see from hive shell&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;hive&amp;gt; &lt;STRONG&gt;ADD JAR /opt/cloudera/parcels/CDH/lib/hbase/lib/metrics-core-2.2.0.jar;&lt;/STRONG&gt;&lt;BR /&gt;Added [/opt/cloudera/parcels/CDH/lib/hbase/lib/metrics-core-2.2.0.jar] to class path&lt;BR /&gt;Added resources: [/opt/cloudera/parcels/CDH/lib/hbase/lib/metrics-core-2.2.0.jar]&lt;BR /&gt;hive&amp;gt; &lt;STRONG&gt;SET hive.hbase.snapshot.name=snapshot_20150920&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;gt; ;&lt;/STRONG&gt;&lt;BR /&gt;hive&amp;gt; &lt;STRONG&gt;select * from e where id = '...';&lt;/STRONG&gt;&lt;BR /&gt;OK&lt;BR /&gt;Failed with exception java.io.IOException:java.io.IOException: java.lang.NoClassDefFoundError: com/yammer/metrics/core/MetricsRegistry&lt;BR /&gt;Time taken: 36.085 seconds&lt;BR /&gt;hive&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I should add that the jar file does exist at the location in ADD JAR&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;$ ls -ltr /opt/cloudera/parcels/CDH/lib/hbase/lib/metrics-core-2.2.0.jar&lt;BR /&gt;lrwxrwxrwx 1 root root 36 Aug 13 14:40 /opt/cloudera/parcels/CDH/lib/hbase/lib/metrics-core-2.2.0.jar -&amp;gt; ../../../jars/metrics-core-2.2.0.jar&lt;/P&gt;</description>
      <pubDate>Sun, 20 Sep 2015 21:06:20 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-HBase-snapshot-query-results-in-exception/m-p/32064#M7161</guid>
      <dc:creator>NitinA</dc:creator>
      <dc:date>2015-09-20T21:06:20Z</dc:date>
    </item>
    <item>
      <title>Re: Hive HBase snapshot query results in exception</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-HBase-snapshot-query-results-in-exception/m-p/32067#M7162</link>
      <description>Looks like the jar is also required on the front-end. In addition to the&lt;BR /&gt;ADD JAR within the prompt, please also launch the CLI instead in this way:&lt;BR /&gt;&lt;BR /&gt;~&amp;gt; export HADOOP_CLASSPATH=$(hbase classpath)&lt;BR /&gt;~&amp;gt; hive&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 21 Sep 2015 02:20:55 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-HBase-snapshot-query-results-in-exception/m-p/32067#M7162</guid>
      <dc:creator>Harsh J</dc:creator>
      <dc:date>2015-09-21T02:20:55Z</dc:date>
    </item>
    <item>
      <title>Re: Hive HBase snapshot query results in exception</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-HBase-snapshot-query-results-in-exception/m-p/32092#M7163</link>
      <description>&lt;P&gt;No go yet Harsh, same error again. Here is what I did.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;$ export HADOOP_CLASSPATH=$(hbase classpath)&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt;$ sudo -u hdfs hive&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;EM&gt;Logging initialized using configuration in jar:file:/opt/cloudera/parcels/CDH-5.4.4-1.cdh5.4.4.p0.4/jars/hive-common-1.1.0-cdh5.4.4.jar!/hive-log4j.properties&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;WARNING: Hive CLI is deprecated and migration to Beeline is recommended.&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;hive&amp;gt; &lt;STRONG&gt;ADD JAR /opt/cloudera/parcels/CDH/lib/hbase/lib/metrics-core-2.2.0.jar;&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Added [/opt/cloudera/parcels/CDH/lib/hbase/lib/metrics-core-2.2.0.jar] to class path&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Added resources: [/opt/cloudera/parcels/CDH/lib/hbase/lib/metrics-core-2.2.0.jar]&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;hive&amp;gt; &lt;STRONG&gt;SET hive.hbase.snapshot.name=snapshot_20150920;&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;hive&amp;gt; &lt;STRONG&gt;select * from e where id = '...';&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;OK&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Failed with exception java.io.IOException:java.io.IOException: java.lang.NoClassDefFoundError: com/yammer/metrics/core/MetricsRegistry&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Time taken: 28.503 seconds&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;hive&amp;gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I did verify that $(hbase classpath) has the metrics-core-2.2.0.jar.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Sep 2015 17:15:44 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-HBase-snapshot-query-results-in-exception/m-p/32092#M7163</guid>
      <dc:creator>NitinA</dc:creator>
      <dc:date>2015-09-21T17:15:44Z</dc:date>
    </item>
    <item>
      <title>Re: Hive HBase snapshot query results in exception</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-HBase-snapshot-query-results-in-exception/m-p/32093#M7164</link>
      <description>The use of sudo will not pass forward your local environment. Login and try&lt;BR /&gt;instead.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 21 Sep 2015 17:36:55 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-HBase-snapshot-query-results-in-exception/m-p/32093#M7164</guid>
      <dc:creator>Harsh J</dc:creator>
      <dc:date>2015-09-21T17:36:55Z</dc:date>
    </item>
    <item>
      <title>Re: Hive HBase snapshot query results in exception</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-HBase-snapshot-query-results-in-exception/m-p/32109#M7165</link>
      <description>&lt;P&gt;Thanks Harsh, that was it. It works!&lt;/P&gt;</description>
      <pubDate>Mon, 21 Sep 2015 22:39:24 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-HBase-snapshot-query-results-in-exception/m-p/32109#M7165</guid>
      <dc:creator>NitinA</dc:creator>
      <dc:date>2015-09-21T22:39:24Z</dc:date>
    </item>
    <item>
      <title>Re: Hive HBase snapshot query results in exception</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-HBase-snapshot-query-results-in-exception/m-p/32416#M7166</link>
      <description>&lt;P&gt;We too have the similar issue while reading from the hbase snapshot . Here is our senario&lt;BR /&gt;Created a table in HBASE (create 'TEST_HBASE_TABLE','cf')&lt;BR /&gt;Created a hive external hbase table with name TEST_EXTERNAL_HBASE_TABLE&lt;BR /&gt;created snapshot for (snapshot 'TEST_HBASE_TABLE','TEST_SNAPSHOT')&lt;BR /&gt;set the hive hbase property (set hive.hbase.snapshot.name=TEST_SNAPSHOT)&lt;BR /&gt;execute the query ( select * from TEST_EXTERNAL_HBASE_TABLE )&lt;BR /&gt;&lt;BR /&gt;got the below exception . Need some help in fixing this issue&lt;/P&gt;&lt;P&gt;2015-09-28 16:10:29,025 WARN org.apache.hadoop.security.UserGroupInformation: PriviledgedActionException as:hbase_user (auth:SIMPLE) cause:org.apache.hive.service.cli.Hivetion: java.io.IOException: java.io.IOException: java.lang.NoClassDefFoundError: Could not initialize class org.apache.hadoop.hbase.io.hfile.CacheStats&lt;BR /&gt;&lt;BR /&gt;org.apache.hive.service.cli.HiveSQLException: java.io.IOException: java.io.IOException: java.lang.NoClassDefFoundError: Could not initialize class org.apache.hadoop.hbasle.CacheStats&lt;BR /&gt;at org.apache.hive.service.cli.operation.SQLOperation.getNextRowSet(SQLOperation.java:329)&lt;BR /&gt;at org.apache.hive.service.cli.operation.OperationManager.getOperationNextRowSet(OperationManager.java:250)&lt;BR /&gt;at org.apache.hive.service.cli.session.HiveSessionImpl.fetchResults(HiveSessionImpl.java:699)&lt;BR /&gt;at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)&lt;BR /&gt;at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)&lt;BR /&gt;at java.lang.reflect.Method.invoke(Method.java:497)&lt;BR /&gt;at org.apache.hive.service.cli.session.HiveSessionProxy.invoke(HiveSessionProxy.java:78)&lt;BR /&gt;at org.apache.hive.service.cli.session.HiveSessionProxy.access$000(HiveSessionProxy.java:36)&lt;BR /&gt;at org.apache.hive.service.cli.session.HiveSessionProxy$1.run(HiveSessionProxy.java:63)&lt;BR /&gt;at java.security.AccessController.doPrivileged(Native Method)&lt;BR /&gt;at javax.security.auth.Subject.doAs(Subject.java:422)&lt;BR /&gt;at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1671)&lt;BR /&gt;at org.apache.hive.service.cli.session.HiveSessionProxy.invoke(HiveSessionProxy.java:59)&lt;BR /&gt;at com.sun.proxy.$Proxy17.fetchResults(Unknown Source)&lt;BR /&gt;at org.apache.hive.service.cli.CLIService.fetchResults(CLIService.java:451)&lt;BR /&gt;at org.apache.hive.service.cli.thrift.ThriftCLIService.FetchResults(ThriftCLIService.java:676)&lt;BR /&gt;at org.apache.hive.service.cli.thrift.TCLIService$Processor$FetchResults.getResult(TCLIService.java:1553)&lt;BR /&gt;at org.apache.hive.service.cli.thrift.TCLIService$Processor$FetchResults.getResult(TCLIService.java:1538)&lt;BR /&gt;at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39)&lt;BR /&gt;at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:39)&lt;BR /&gt;at org.apache.hive.service.auth.TSetIpAddressProcessor.process(TSetIpAddressProcessor.java:56)&lt;BR /&gt;at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:285)&lt;BR /&gt;at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)&lt;BR /&gt;at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)&lt;BR /&gt;at java.lang.Thread.run(Thread.java:745)&lt;BR /&gt;Caused by: java.io.IOException: java.io.IOException: java.lang.NoClassDefFoundError: Could not initialize class org.apache.hadoop.hbase.io.hfile.CacheStats&lt;BR /&gt;at org.apache.hadoop.hive.ql.exec.FetchOperator.getNextRow(FetchOperator.java:507)&lt;BR /&gt;at org.apache.hadoop.hive.ql.exec.FetchOperator.pushRow(FetchOperator.java:414)&lt;BR /&gt;at org.apache.hadoop.hive.ql.exec.FetchTask.fetch(FetchTask.java:138)&lt;BR /&gt;at org.apache.hadoop.hive.ql.Driver.getResults(Driver.java:1657)&lt;BR /&gt;at org.apache.hive.service.cli.operation.SQLOperation.getNextRowSet(SQLOperation.java:324)&lt;BR /&gt;... 24 more&lt;BR /&gt;Caused by: java.io.IOException: java.lang.NoClassDefFoundError: Could not initialize class org.apache.hadoop.hbase.io.hfile.CacheStats&lt;BR /&gt;at org.apache.hadoop.hbase.regionserver.HRegion.initializeRegionStores(HRegion.java:951)&lt;BR /&gt;at org.apache.hadoop.hbase.regionserver.HRegion.initializeRegionInternals(HRegion.java:841)&lt;BR /&gt;at org.apache.hadoop.hbase.regionserver.HRegion.initialize(HRegion.java:814)&lt;BR /&gt;at org.apache.hadoop.hbase.regionserver.HRegion.openHRegion(HRegion.java:5828)&lt;BR /&gt;at org.apache.hadoop.hbase.regionserver.HRegion.openHRegion(HRegion.java:5794)&lt;BR /&gt;at org.apache.hadoop.hbase.regionserver.HRegion.openHRegion(HRegion.java:5765)&lt;BR /&gt;at org.apache.hadoop.hbase.client.ClientSideRegionScanner.&amp;lt;init&amp;gt;(ClientSideRegionScanner.java:57)&lt;BR /&gt;at org.apache.hadoop.hbase.mapreduce.TableSnapshotInputFormatImpl$RecordReader.initialize(TableSnapshotInputFormatImpl.java:190)&lt;BR /&gt;at org.apache.hadoop.hbase.mapred.TableSnapshotInputFormat$TableSnapshotRecordReader.&amp;lt;init&amp;gt;(TableSnapshotInputFormat.java:96)&lt;BR /&gt;at org.apache.hadoop.hbase.mapred.TableSnapshotInputFormat.getRecordReader(TableSnapshotInputFormat.java:150)&lt;BR /&gt;at org.apache.hadoop.hive.hbase.HiveHBaseTableSnapshotInputFormat.getRecordReader(HiveHBaseTableSnapshotInputFormat.java:74)&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2015 18:57:26 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-HBase-snapshot-query-results-in-exception/m-p/32416#M7166</guid>
      <dc:creator>SriVenu</dc:creator>
      <dc:date>2015-09-28T18:57:26Z</dc:date>
    </item>
  </channel>
</rss>

