内容纲要
问题现象
默认使用Hyperbase2,如果使用高版本Argodb(5.2) + hbase1 建表会报错列族找不到:org.apache.hadoop.hive.ql.metadata.HiveException: Can not create table: Pre-Create table failed. org.apache.hadoop.hbase.regionserver.NoSuchColumnFamilyException
问题原因
由于quark需要同时支持hbase1.x和2.x,所以在quark中做了相关的兼容性设计
- 新增组件idbc/hyper2drive 和hive-hbase2-handler ,用来支持hbase2的客户端api
- stored as hyperdrive语法不变,根据quark.hyperdrive2.enable参数来选择映射hyperdrive还是hyper2drive
- 相关jar包都会提供到/usr/lib/inceptor/lib 目录下,但是会根据配置项支持的hbase版本,选择load不同的jar包,不加载的jar包权限改成不可读,如下:
#jar包路径/usr/lib/inceptor/lib
#hbase 1.x对应的jar包
-rw------- 1 root root 18115702 Aug 11 2022 hbase1-shaded-client-1.3.1-transwarp-8.1.0.jar
-rw------- 1 root root 36740620 Aug 11 2022 hbase1-shaded-server-1.3.1-transwarp-8.1.0.jar
#hbase 2.x对应的jar包
-rw-r--r-- 1 root root 74619798 Aug 11 2022 hbase-shaded-client-transwarp-9.0.0.jar
-rw-r--r-- 1 root root 45085538 Aug 11 2022 hbase-shaded-mapreduce-transwarp-9.0.0.jar
-rw-r--r-- 1 root root 54200522 Aug 11 2022 hbase-shaded-server-transwarp-9.0.0.jar
解决方案
quark.hyperdrive2.enable
配置默认为true,使用hbase2.x, 将quark.hyperdrive2.enable
改成false,使用hbase1.x