美文网首页
通过DBeaver连接Phoenix操作hbase

通过DBeaver连接Phoenix操作hbase

作者: 风静花犹落 | 来源:发表于2023-02-19 18:23 被阅读0次

下载DBeaver

https://dbeaver.io/download

配置JDK(可选)

编辑DBeaver安装目录下DBeaver.ini文件,在首行添加JDK安装路径

-vm
 D:\ProgramFiles\jdk\bin

连接HBase

1. 配置

文件 > 新建 > 数据库连接 > Apache Phoenix > 填写相应的host,port,username,password信息

2.驱动文件

自动下载驱动
编辑驱动设置 > 库 > 下载/更新 > 下载配置 > 驱动/Maven 
> 添加(国内镜像:http://maven.aliyun.com/nexus/content/groups/public)
手动配置驱动
编辑驱动设置 > 库 > 添加文件 > phoenix-client-hbase-2.3-5.1.2.jar > 删除其他文件

注意: 若连接不上,可重启DBeaver再试

连接异常

问题描述

ERROR 726 (43M10): Inconsistent namespace mapping properties. Cannot initiate connection as SYSTEM:CATALOG is found but client does not have phoenix.schema.isNamespaceMappingEnabled enabled

解决方案

编辑连接 > 驱动属性 > 添加用户属性

phoenix.schema.isNamespaceMappingEnabled  true
phoenix.schema.mapSystemTablesToNamespace  true

原因:是hbase-site.xml中设置了相应的属性

<configuration>
  <property>
    <name>phoenix.schema.isNamespaceMappingEnabled</name>
    <value>true</value>
  </property>
  
  <property>
    <name>phoenix.schema.mapSystemTablesToNamespace</name>
    <value>true</value>
  </property>
</configuration>

Phoenix语法

参见 https://phoenix.apache.org/language/index.html

相关文章

网友评论

      本文标题:通过DBeaver连接Phoenix操作hbase

      本文链接:https://www.haomeiwen.com/subject/pbzikdtx.html