- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Spark sqlContext - unable to access hbase table mapped in hive as external table
- Labels:
-
Apache Hive
-
Apache Spark
Created ‎08-31-2016 09:07 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Env: Sandbox in VMware.
I am trying to access Hbase table mapped in Hive and failing with below error. Am i missing in the configuration part.
scala> val res = sqlContext.sql("select * from hbase_user_act") 16/08/31 20:57:06 INFO ParseDriver: Parsing command: select * from hbase_user_act 16/08/31 20:57:07 INFO ParseDriver: Parse Completed 16/08/31 20:57:07 ERROR log: error in initSerDe: java.lang.ClassNotFoundException Class org.apache.hadoop.hive.hbase.HBaseSerDe not found java.lang.ClassNotFoundException: Class org.apache.hadoop.hive.hbase.HBaseSerDe not found at org.apache.hadoop.conf.Configuration.getClassByName(Configuration.java:2101) ... ... java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Error in loading storage handler.org.apache.hadoop.hive.hbase.HBaseStorageHandler ... ... Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.hive.hbase.HBaseStorageHandler
Created ‎08-31-2016 09:40 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The issue is happening in both spark-shell and pyspark shell.
Created ‎08-31-2016 09:58 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@jgeorge : Could you please with this one.
Created ‎09-01-2016 12:37 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I think you need to use HiveContext and not SQLContext.
https://spark.apache.org/docs/1.3.0/api/java/org/apache/spark/sql/hive/HiveContext.html
Created ‎09-02-2016 12:47 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@mqureshi Even with HiveContext, the error still persists.
Created ‎09-02-2016 08:28 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There are several ways to skin this cat but they would require some classpath tricks. Before going there, could you create in Hive a view of that table, e.g. create view hbase_user_act_view as select * from hbase_user_act; and test with that? Use HiveContext, please. Let me know.
If any of the responses in this thread addressed your issue, don't forget to vote and accept best answer.
Created on ‎09-07-2017 11:54 AM - edited ‎08-19-2019 02:39 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Constantin Stanca I am using Zeppelin with Spark Interpreter to access the hive-hbase table. I get the following error while running the query:
java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Error in loading storage handler.org.apache.hadoop.hive.hbase.HBaseStorageHandler
I have added
even the required jars in classpath for Spark interpreter but still the issue persists:
Could you please let me know what could be the problem?
Created ‎07-17-2018 08:30 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@mb
I am facing the same issue, could you please advice how to work around or troubleshoot this problem ?
Thanks,
Nam
,
HI I'm facing the same issue. Could you please provide some hint or solutions ?
Created ‎07-17-2018 08:31 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@mb
I am facing the same issue, could you please advice how to work around or troubleshoot this problem ?
Thanks,
Nam
