通过DBeaver连接Phoenix操作hbase

下载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中设置了相应的属性


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

Phoenix语法

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

你可能感兴趣的:(通过DBeaver连接Phoenix操作hbase)