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文 ...
随机推荐
- Eclipse Alt + / 快捷键失效
需要重新设置快捷键.按快捷键ctrl+shirt+L,然后在按一下L.设置快捷键的对话框就出来了,然你将Word Completion移除,在将Content Assist 这个设置为alt+/.就可 ...
- 彻底成功配置Maven和Eclipse集成
这篇文章是分享给还在苦苦挣扎eclipse和Maven环境配置的同志,让其少走弯路,话不多说,直接开始吧 环境出问题一是配置没有配置好,二是各个部分可能出现兼容问题,导致错误,综上,我选择了一个切实可 ...
- Ubuntu定时任务设置
设置很简单,但如果误入歧途,会耽误很多时间 步骤如下: 1. 以root执行:vi /etc/crontab 2. 在文件最后添加cron配置(每天凌晨四点执行,并将日志输出到/data/cron.l ...
- sql 性能优化相关--总结别人的总结,未做验证,先归纳
sql语句性能达不到你的要求,执行效率让你忍无可忍,一般会时下面几种情况. 网速不给力,不稳定. 服务器内存不够,或者SQL 被分配的内存不够. sql语句设计不合理 没有相应的索引,索引不合理 没有 ...
- vue 2.0创建新项目
参考链接 https://segmentfault.com/a/1190000011275993 背景在安装完node的基础上,机器什么都没安装参考上述链接 一.下载vue $ cnpm insta ...
- Linux 中的rsh,ssh
第一部分 rsh 的安装与配置 http://www.ttlsa.com/linux/configure-rsh-rcp-scp-on-centos/ http://www.ahlinux.com/s ...
- (转)Linux企业运维人员常用的150个命令分享
Linux企业运维人员常用的150个命令分享 原文:http://www.jb51.net/article/127014.htm 本文将向大家介绍Linux企业运维人员常用的150个命令,如有不足之处 ...
- unittest 几个重要概念
unittest是一个python版本的junit,junit是java中的单元测试框架,unittest实现了很多junit中的概念,比如我们非常熟悉的test case, test suite等, ...
- 【Css】Layout布局(二)
css定位(Positioning) 所谓定位,即允许你定义元素框相对于其正常位置应该出现的位置,或者相对于父元素.另一个元素甚至浏览器窗口本身的位置. css提供了三种基本的定位机制:普通流.浮动和 ...
- hibernate 中对象的3种状态总结
1.Hibernate把对象分文三种状态:Transient(临时状态).Persistent(持久化状态).Detached(游离状态). 1)Transient:刚刚new出来的对象,就是Tran ...