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.

  1. Client {
  2. com.sun.security.auth.module.Krb5LoginModule required useTicketCache=true renewTicket=true
  3. serviceName="zookeeper";};

Modify dbvisgui.bat file to add following parameters for launching DBVisualizer

  1. -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.

  1. Client {
  2. com.sun.security.auth.module.Krb5LoginModule
  3. requireduseTicketCache=false
  4. useKeytab=true
  5. 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的更多相关文章

  1. 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 ...

  2. 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 ...

  3. [saiku] 使用 Apache Phoenix and HBase 结合 saiku 做大数据查询分析

    saiku不仅可以对传统的RDBMS里面的数据做OLAP分析,还可以对Nosql数据库如Hbase做统计分析. 本文简单介绍下一个使用saiku去查询分析hbase数据的例子. 1.phoenix和h ...

  4. HBase 4、Phoenix安装和Squirrel安装

    描述 现有hbase的查询工具有很多如:Hive,Tez,Impala,Shark/Spark,Phoenix等.今天主要记录Phoenix. phoenix,中文译为“凤凰”,很美的名字.Phoen ...

  5. 【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 ...

  6. Hive导入数据到HBase,再与Phoenix映射同步

    1. 创建HBase 表 create 'hbase_test','user' 2. 插入数据 put 'hbase_test','111','user:name','jack' put 'hbase ...

  7. HBase 5、Phoenix使用

    1.建表 执行建表语句 $ . ../examples/stock_symbol.sql 其中../examples/stock_symbol.sql是建表的sql语句 CREATE TABLE IF ...

  8. 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 ...

  9. JAVA API访问Hbase org.apache.hadoop.hbase.client.RetriesExhaustedException: Failed after attempts=32

    Java使用API访问Hbase报错: 我的hbase主节点是spark1   java代码访问hbase的时候写的是ip 结果运行程序报错 不能够识别主机名 修改主机名     修改主机hosts文 ...

随机推荐

  1. 吴裕雄 python 机器学习——聚类

    import numpy as np import matplotlib.pyplot as plt from sklearn.datasets.samples_generator import ma ...

  2. css实现渐变

    .gradient{ background: -webkit-gradient(linear, 0 0, 0 100%, from(#8ca0d3), to(#375a9a)); /** Chrome ...

  3. HDU - 4866 主席树 二分

    题意:在x轴\([1,X]\)内的上空分布有n个占据空间\([L_i,R_i]\),高度\(D_i\)的线段,射中线段的得分为其高度,每次询问从x轴的\(x\)往上空射的最近k个线段的总得分,具体得分 ...

  4. 矩阵&&高斯消元

    矩阵运算: \(A\times B\)叫做\(A\)左乘\(B\),或者\(B\)右乘\(A\). 行列式性质: \(1.\)交换矩阵的两行(列),行列式取相反数. \(2.\)某一行元素都\(\ti ...

  5. apt 命令大全

    #1. 搜索包 sudo apt-cache search package #2.获取包的相关信息,如说明,大小,版本. sudo apt-cache show package #3.了解包的依赖 s ...

  6. appium解决无法通过name属性识别元素org.openqa.selenium.InvalidSelectorException: Locator Strategy 'name' is not supported for this session

    执行代码.: public AndroidDriver<AndroidElement> appiumDriver; appiumDriver.findElement(By.name(&qu ...

  7. Maven 编译报错

    [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-t ...

  8. Macaca 等待机制

    看代码注释todo 写博客 服务写脚本开吧 , 因为窗口太多,  不知道要去哪关闭服务 开的话无所谓 , 哪里都能开 要确认是否有开 , 直接跑代码 下面的要先过 别人的环境 工具软件自己的问题 不支 ...

  9. 《数据密集型应用系统设计》读书笔记-ch1可靠、可扩展与可维护的应用系统

    我们以Twitter为例,使用其2012年11月发布的数据.Twitter的两个典型业务操作是: - 发布tweet消息: 用户可以快速推送新消息到所有的关注者,平均大约4.6k request/se ...

  10. xamarin RunOnUiThread

    One of the keys to maintaining a responsive GUI is to do long-running tasks on a background thread s ...