How to compile hive-hbase-handler-1.2.1.jar
This article focuses on "how to compile hive-hbase-handler-1.2.1.jar", interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn how to compile hive-hbase-handler-1.2.1.jar.
Compile hive-hbase-handler-1.2.1.jar
1. Download the hive-1.2.1 source code
two。 Modify apache-hive-1.2.1-src/pom.xml, change the hbase version to the habse version you use, and then compile and package it with mvn.
1.1.3
3. The generated hive-hbase-handler-1.2.1.jar is copied under hive-1.2.1/lib to replace the hive-hbase-handler-1.2.1.jar that comes with hive.
4. Start hive
Hive-hiveconf hbase.zookeeper.quorum=bi3:2181,bi4:2181,bi5:2181 question: 1. Does hive.aux.jars.path need to be configured?
It depends on your configuration. If you have configured HADOOP_HOME,HIVE_HOME,HBASE_HOME in a system variable (such as .bash _ profile), you don't have to configure this variable at all.
2.-is hiveconf hbase.zookeeper.quorum required?
If you have already configured HBASE_HOME, congratulations, you don't need to configure this either.
Test:
Create a new hive,hbase integration table
Hive > CREATE TABLE hbase_table_2 (key int, value string) > STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler' > WITH SERDEPROPERTIES ("hbase.columns.mapping" = ": key,cf1:val") > TBLPROPERTIES ("hbase.table.name" = "xyz2"); OKTime taken: 5.586 secondshive > show tables OKhbase_table_1hbase_table_2Time taken: 0.213 seconds Fetched: 2 row (s) hbase (main): 003 hbase 0 > listTABLE xyz Xyz2 2 row (s) in 0.0160 seconds= > ["xyz" "xyz2"] so far I believe that everyone has a deeper understanding of "how to compile hive-hbase-handler-1.2.1.jar", might as well come to the actual operation of it! Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!