Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to integrate hbase with hive

Shulou Source: shulou.com Published: 2022-05-31 21:24:58 09月22日 Update

Editor to share with you how to integrate hive hbase, I believe that most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to understand it!

1. Copy hbase-0.94.6.1.jar to each hive/lib, if hbase-0.89.0-SNAPSHOT.ja exists

Need to delete

2. Copy zookeeper-3.4.5.jar to hive/lib. If there is another version, you need to delete it.

3. Configure the following information in hive-default.xml

Hive.aux.jars.path

File:///home/hadoop/local/hive/lib/hive-hbase-handler-0.7.1.jar,file:///home/hadoop/local/hive/lib/hbase-0.94.6.1.jar,file:///home/hadoop/local/hive/lib/zookeeper-3.4.5.jar

4. Copy the hbase-0.94.6.1.jar to the hadoop/lib of each node

5. Copy hbase/conf/hbase-site.xml to each hadoop/conf/

Step 3 can be written as follows:

Hive--auxpath / home/hadoop/local/hive/lib/hive-hbase-handler-0.7.1.jar,/home/hadoop/local/hive/lib/hbase-0.94.6.1.jar,/home/hadoop/local/hive/lib/zookeeper-3.4.5.jar,/home/hadoop/local/hive/lib/guava-r06.jar-hiveconf hbase.master=192.168.11.51:50030

Hive--auxpath / home/hadoop/local/hive/lib/hive-hbase-handler-0.7.1.jar,/home/hadoop/local/hive/lib/hbase-0.94.6.1.jar,/home/hadoop/local/hive/lib/zookeeper-3.4.5.jar,/home/hadoop/local/hive/lib/guava-r06.jar-hiveconf hbase.zookeeper.quorum=bfdbjc2,bfdbjc3,bfdbjc4

After the above configuration is done, start to create the hive table associated with the hbase

CREATE EXTERNAL TABLE test.itembase (

Rowkey string

Cid string

Cat string

)

STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'

WITH SERDEPROPERTIES ("hbase.columns.mapping" = ": key,i:cid,i:cat")

TBLPROPERTIES ("hbase.table.name" = "AddCart")

The above is all the content of the article "how hive integrates hbase". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Tags: Copy article content configuration not much information most way more version knowledge node industry information information channel channel association reference learning help Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Tech Info Huawei Docker MariaDB Linux