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文 ...
随机推荐
- angular5新增全局的模块
比如新增一个全局的swiper,需要在webpack中配置: 之后在代码中就可以用了
- SQL多字段排序
emm 其实也没什么 就是写sql查询的时候 要对多个字段排序比如 查询原本的数据是 年份 科目 批次 2014 理科 本二2015 理科 本二 2015 理科 本一2016 理科 本二 2016 ...
- JVM架构和GC垃圾回收机制
深入理解系列之JDK8下JVM虚拟机(1)——JVM内存组成 https://blog.csdn.net/u011552404/article/details/80306316 JVM架构和GC垃圾回 ...
- 当Appium中遇到alert(python篇)
当Appium中遇到alert,可以使用switch_to_alert(),以下是微信登录切换登录方式的代码示例: #coding=utf-8 from appium import webdriver ...
- CentOS&.NET Core初试-3-Nginx的安装和配置
系列目录 CentOS的安装和网卡的配置 安装.NET Core SDK和发布网站 Nginx的安装和配置 安装守护服务(Supervisor) Nginx简介 Nginx是一个免费的,开源的,高 ...
- db2 tsm backup fails with rc–50(1)
2015-01-05-19.21.54.477532+000 E8484227A347 LEVEL: Error PID : 10027058 TID : ...
- (转)python之os,sys模块详解
python之sys模块详解 原文:http://www.cnblogs.com/cherishry/p/5725184.html sys模块功能多,我们这里介绍一些比较实用的功能,相信你会喜欢的,和 ...
- ajax中的异步机制导致的问题
设置async:false;即可将请求设置为同步的,所以,我们就可以实现:在ajax请求之后再执行下面的语句.
- 我的Python升级打怪之路【二】:Python的基本数据类型及操作
基本数据类型 1.数字 int(整型) 在32位机器上,整数的位数是32位,取值范围是-2**31~2--31-1 在64位系统上,整数的位数是64位,取值范围是-2**63~2**63-1 clas ...
- JDBC(2)-使用statment接口实现增删改操作
1.Statement接口引入 作用:用于执行静态SQL语句并返回它所生成结果的对象. int executeUpdate(String sql) :执行给定SQL语句,该语句可能为insert.up ...