How to use DBVisualizer to connect to Hbase using Apache Phoenix
Article
DB Visualizer is a popular free tool that allows developers to organize development tools for RDBMS development. With Apache Phoenix, that allows SQL like capability for Hbase, we can use DBVisualizer to connect to Apache Phoenix layer for HBase.
Verified with following versions.
- DBVisualizer version 9.2.12
- hbase-client-1.1.2.2.3.2.0-2950.jar
- phoenix-4.4.0.2.3.2.0-2950-client.jar
First Add Phoenix driver to DBVisualizer. In DBVisualizer, go to Tools->Driver Manager and add a new driver. Add both hbase-client and phoenix-client jar. This will add a new Phoenix driver.
1. Connecting to Non-Kerberos cluster
To connect to a Non-Kerberos cluster, use jdbc:phoenix:<zookeeper host>:<zookeeper port>:<hbase_z_node> as connection string where hbase_z_node is :/hbase by default.
2. Connecting to Kerberos cluster using cached ticket
To connect to a Kerberos cluster,
a. add following files to DBVisualizer resources directory.
- hdfs-site.xml
- hbase-site.xml
- core-site.xml
b. Copy krb5.conf file to local workstation.
c. Create a jaas file with following entry.
- Client {
- com.sun.security.auth.module.Krb5LoginModule required useTicketCache=true renewTicket=true
- serviceName="zookeeper";};
Modify dbvisgui.bat file to add following parameters for launching DBVisualizer
- -Djava.security.auth.login.config="<path-to-jaas-file>" -Djava.security.krb5.conf="<path-to-krb5-file>"
d. Connection string for cached keytab will be
jdbc:phoenix:<zookeeper host>:<zookeeper port>:/hbase-secure:<path-to-jaas file>
3. Connecting to Kerberos cluster using keytab
a. add following files to DBVisualizer resources directory.
- hdfs-site.xml
- hbase-site.xml
- core-site.xml
b. Copy krb5.conf file to local workstation.
c. copy keytab file use for connecting to Hbase.
d. Create a jaas file with following entry.
- Client {
- com.sun.security.auth.module.Krb5LoginModule
- requireduseTicketCache=false
- useKeytab=true
- serviceName="zookeeper";};
Connection string for this case will be
jdbc:phoenix:<zookeeper host>:<zookeeper port>:/hbase-secure:<Principal>:<path-to-keytab>
Sample connection string
jdbc:phoenix:host0001:2181:/hbase-secure:<principal>:\users\z_hadoop_test.keytab
Test your connection !
How to use DBVisualizer to connect to Hbase using Apache Phoenix的更多相关文章
- Unable to connect to HBase using Phoenix JDBC Driver
Feb 01, 2017; 5:21pm Unable to connect to HBase using Phoenix JDBC Driver 9 posts Hi All, I am try ...
- phoenix连接hbase数据库,创建二级索引报错:Error: org.apache.phoenix.exception.PhoenixIOException: Failed after attempts=36, exceptions: Tue Mar 06 10:32:02 CST 2018, null, java.net.SocketTimeoutException: callTimeou
v\:* {behavior:url(#default#VML);} o\:* {behavior:url(#default#VML);} w\:* {behavior:url(#default#VM ...
- [saiku] 使用 Apache Phoenix and HBase 结合 saiku 做大数据查询分析
saiku不仅可以对传统的RDBMS里面的数据做OLAP分析,还可以对Nosql数据库如Hbase做统计分析. 本文简单介绍下一个使用saiku去查询分析hbase数据的例子. 1.phoenix和h ...
- HBase 4、Phoenix安装和Squirrel安装
描述 现有hbase的查询工具有很多如:Hive,Tez,Impala,Shark/Spark,Phoenix等.今天主要记录Phoenix. phoenix,中文译为“凤凰”,很美的名字.Phoen ...
- 【maven】maven打包deploy时候报错:Connect to repo.maven.apache.org:443
使用maven打包报错如下: [ERROR] Plugin org.springframework.boot:spring-boot-maven-plugin:1.5.4.RELEASE or one ...
- Hive导入数据到HBase,再与Phoenix映射同步
1. 创建HBase 表 create 'hbase_test','user' 2. 插入数据 put 'hbase_test','111','user:name','jack' put 'hbase ...
- HBase 5、Phoenix使用
1.建表 执行建表语句 $ . ../examples/stock_symbol.sql 其中../examples/stock_symbol.sql是建表的sql语句 CREATE TABLE IF ...
- org.apache.hadoop.hbase.DoNotRetryIOException: Class org.apache.phoenix.coprocessor.MetaDataEndpointImpl cannot be loaded Set hbase.table.sanity.checks to false at conf or table descriptor if you want
https://stackoverflow.com/questions/38495331/apache-phoenix-unable-to-connect-to-hbase 这个坑不该啊 首选配置hb ...
- JAVA API访问Hbase org.apache.hadoop.hbase.client.RetriesExhaustedException: Failed after attempts=32
Java使用API访问Hbase报错: 我的hbase主节点是spark1 java代码访问hbase的时候写的是ip 结果运行程序报错 不能够识别主机名 修改主机名 修改主机hosts文 ...
随机推荐
- Ubuntu16.04安装视觉SLAM环境(ceres-solver)
1.先在github上下载ceres-solver git clone https://github.com/ceres-solver/ceres-solver.git 2.安装ceres-solve ...
- SQL数据库Truncate的相关用法
数据库中 Truncate的用法:这个是删除表中的所有数据语法是 Truncate Table tablename他与delete的区别在于1 delete 可以有条件的删除 而truncate 是删 ...
- Oracle 备份还原
导出整个数据库,在CMD命令窗口执行 EXP 用户名/密码@服务名(数据库) FULL=Y FILE=路径 EXP INTERFACE/INTERFACE@PIVAS_XMDWYY FULL=Y FI ...
- centos安装postgresql-rpm
rpm -ivh pgdg-centos93-9.3-3.noarch.rpm确认,回车,
- Notepad++配置替换快捷配置
我们经常会收到实施或客户提供的excel文档,需要将对应的数据从数据库删除,那么我们怎么能快速把excel中的内容加上单引号和逗号到数据库中处理呢,我们可以使用nodepad++中的替换功能. 1.打 ...
- elastic 常用操作
前缀搜索
- 使用virtualbox虚拟安装macos
需要工具: 虚拟机virtualbox:https://www.virtualbox.org/ empireEFIv1085.iso启动文件:http://yunpan.cn/c6UDGwL6wJm6 ...
- 学习react心得及总结
注意学习这个在D盘:小红书第一部分的案例react/new-my-app 小红书第二部分的案例react/make-redux 小红书第三部分的案例react/my-app-higher 并且里面有说 ...
- android httpclient 上传图片
需要依赖 httpmime.jar /** * 上传图片 * * @param url * 上传地址 * @param filepath * 图片路径 * @return */ public Str ...
- Git学习系列之集中式版本控制系统vs分布式版本控制系统
不多说,直接上干货! Linus一直痛恨的CVS及SVN都是集中式的版本控制系统,而Git是分布式版本控制系统,集中式和分布式版本控制系统有什么区别呢? 先说集中式版本控制系统,版本库是集中存放在中央 ...