Quantcast
Channel: CodeSection,代码区,数据库(综合) - CodeSec
Viewing all articles
Browse latest Browse all 6262

Apache Drill 1.8连接HBASE上的问题处理

$
0
0

使用Apache Drill 1.8版本连接HBASE上的问题,碰到了一个,还是花了一定时间去处理,这里记录一些。

问题描述:

Apache Drill 1.8 默认配置下连接HBASE,连接成功,但是执行SQL语句报错。

配置信息 --hbase
{
"type": "hbase",
"config": {
"hbase.zookeeper.quorum": "master",
"hbase.zookeeper.property.clientPort": "2181"
},
"size.calculator.enabled": false,
"enabled": true
}

SQL语句(default下)

select *from hbase.testdata; 错误信息: Query Failed: An Error Occurred
org.apache.drill.common.exceptions.UserRemoteException: SYSTEM ERROR:
IllegalAccessError: tried to access method com.google.common.base.Stopwatch.()V
from class org.apache.hadoop.hbase.zookeeper.MetaTableLocator
[Error Id: 225f9409-3be7-42f2-be6d-4cabe21bc518 on sengtest:31010] 探索过程: 一些尝试:

开始怀疑是HBASE版本问题,找了一个0.98版本,同样的问题

又怀疑JDK版本的问题,用了JDK 1.7,同样的问题

定位问题:

最后还是根据com.google.common.base.Stopwatch.()V定位到问题,

问题参考这个URL ,问题最终是在guava-18.0.jar上

这是HBASE JIRA上原来的说明:


Apache Drill 1.8连接HBASE上的问题处理
处理方法:

定位到问题就简单了,

下载HBASE Shaded Client 替换即可,下载地址: http://mvnrepository.com/artifact/org.apache.hbase/hbase-shaded-client/1.2.3

hbase-annotations-1.1.3.jar

hbase-client-1.1.3.jar

hbase-common-1.1.3.jar

hbase-protocol-1.1.3.jar

替换成

hbase-shaded-client-1.2.3.jar

关于官方文档的一些问题:

查看1.8的文档的时候,hbase storage plugin是这样说的

When connecting Drill to an HBase data source using the HBase storage plugin installed with Drill, you need to specify a ZooKeeper quorum. Drill supports HBase version 0.98.

看了1.7的release notes才发现从Drill 1.7就开始支持HBASE 1.1,这个、这个release文档还是要多看啊。


Viewing all articles
Browse latest Browse all 6262

Trending Articles