phoenix kerberos 连接配置
1. 官网资料
Use JDBC to get a connection to an HBase cluster like this:
Connection conn = DriverManager.getConnection("jdbc:phoenix:server1,server2:3333",props);
where props are optional properties which may include Phoenix and HBase configuration properties, and the connection string which is composed of:
jdbc:phoenix [ :<zookeeper quorum> [ :<port number> [ :<root node> [ :<principal> [ :<keytab file> ] ] ] ] ]
For any omitted parts, the relevant property value, hbase.zookeeper.quorum, hbase.zookeeper.property.clientPort, and zookeeper.znode.parent will be used from hbase-site.xml configuration file. The optional principal and keytab file may be used to connect to a Kerberos secured cluster. If only principal is specified, then this defines the user name with each distinct user having their own dedicated HBase connection (HConnection). This provides a means of having multiple, different connections each with different configuration properties on the same JVM.
For example, the following connection string might be used for longer running queries, where the longRunningProps specifies Phoenix and HBase configuration properties with longer timeouts:
Connection conn = DriverManager.getConnection(“jdbc:phoenix:my_server:longRunning”, longRunningProps);
while the following connection string might be used for shorter running queries:
Connection conn = DriverManager.getConnection("jdbc:phoenix:my_server:shortRunning", shortRunningProps);
Please read the relevant FAQ entry for example URLs.
2. 源码其他配置方法
经过查看phoenix源代码,发现
getConnection还有一个带properties的接口,应该是连接属性,
properties.setProperty("hbase.zookeeper.quorum", "172.16.31.165,172.16.31.166,172.16.31.167");
properties.setProperty("hbase.master.kerberos.principal", "hbase/_HOST@COM");
properties.setProperty("hbase.master.keytab.file", "/etc/security/keytabs/hbase.service.keytab");
properties.setProperty("hbase.regionserver.kerberos.principal", "hbase/_HOST@COM");
properties.setProperty("hbase.regionserver.keytab.file", "/etc/security/keytabs/hbase.service.keytab");
properties.setProperty("phoenix.queryserver.kerberos.principal", "hbase/_HOST@COM");
properties.setProperty("phoenix.queryserver.keytab.file", "/etc/security/keytabs/hbase.service.keytab");
properties.setProperty("hbase.security.authentication", "kerberos");
properties.setProperty("hadoop.security.authentication", "kerberos");
properties.setProperty("zookeeper.znode.parent", "/hbase");
con = DriverManager.getConnection("jdbc:phoenix:172.16.31.165,172.16.31.166,172.16.31.167:2181:/hbase:"+principal+":"+keytab, properties);
phoenix kerberos 连接配置的更多相关文章
- Kerberos主从配置文档
Kerberos主从配置文档 1. Kerberos主从同步机制 在Master上通过以下命令同步数据: kdb5_util dump /var/kerberos/krb5kdc/slave_db ...
- [转] kerberos安装配置与使用
[From] https://blog.csdn.net/lovebomei/article/details/79807484 1.Kerberos协议: Kerberos协议主要用于计算机网络的身份 ...
- HBase单机安装及Phoenix JDBC连接
HBase是建立在Hadoop文件系统之上的分布式面向列的数据库,它是横向扩展的.它利用了Hadoop的文件系统(HDFS)提供的容错能力. HBase提供对数据的随机实时读/写访问,可以直接HBas ...
- “连接配置中心失败,将无法进行正常管理”--腾讯通RTX管理器
[故障现象]: 腾讯通RTX管理器提示“连接配置中心失败,将无法进行正常管理” [解决办法]: 在系统服务中启动“RTX_ConfigCenter”服务即可. 文章收集自网络
- Nginx与Tomcat、Client之间请求的长连接配置不一致问题解决[转]
http://bert82503.iteye.com/blog/2152613 前些天,线上出现“服务端长连接与客户端短连接引起Nginx的Writing.Active连接数过高问题”,这个是由于“服 ...
- SharePoint服务器将连接配置数据库的连接字符串保存在什么地方?
经常有人问我这个问题,SharePoint服务器将连接配置数据库的连接字符串保存在什么地方?虽然其他SharePoint服务器场设置都是保存到了配置数据库里面,但连接配置数据库本身的连接字符串,肯定是 ...
- Android - 设置adb的usb连接配置
设置adb的usb连接配置 本文地址: http://blog.csdn.net/caroline_wendy 把须要測试的手机连接入电脑.通过系统查找USB连接配置,找到厂商ID: 把ID加入进ad ...
- Oracle BEQ方式连接配置
Oracle BEQ方式连接配置 服务端和客户端在同一台机器上,可以使用BEQ连接,BEQ连接可以理解为进程间直接通信,不需要走网络监听,性能更高. 可以参考MOS:How To Connect Us ...
- mongodb远程连接配置
mongodb远程连接配置如下: 1.修改配置文件mongodb.conf 命令:vim /etc/mongodb.conf 把 bind_ip=127.0.0.1 这一行注释掉或者是修改成 bind ...
随机推荐
- C# Net 通用json转Object(对象)
C# Net 通用 json 转 Object 对象 C# Net 提取 json 字符串 对象 数组 C# Net json 对象 中有字符串 转为 对象 例如输入:{"1" ...
- Kotlin开发springboot项目(一)
Kotlin开发springboot项目(一) Kotlin语言与Xtend语言有很多相似之处 为什么会存在这么多JVM语言? 现存的语言提供了太过受限制的功能,要不就是功能太过繁杂,导致语言的臃肿和 ...
- spring boot缓存excel临时文件后再操作
1. 引入poi的两个依赖 <dependency> <groupId>org.apache.poi</groupId> <artifactId>poi ...
- Transformer---BERT模型
一.BERT介绍 论文地址:BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding BERT ...
- CentOS7.5下实现MySQL5.7主从同步
这里使用两台Linux主机(一台充当MySQL主服务器,另一台充当MySQL从服务器),MySQL用yum安装,版本均为5.7,下表是它们所使用的操作系统以及IP地址. 两台Linux主机所使用的操作 ...
- (转)pgbouncer常用配置项详解
https://pgbouncer.github.io/config.html 参考 <PostgreSQL修炼之道>之pgbouncer 配置文件分为[databases] 和 [pgb ...
- 实例解读什么是Redis缓存穿透、缓存雪崩和缓存击穿
from:https://baijiahao.baidu.com/s?id=1619572269435584821&wfr=spider&for=pc Redis缓存的使用,极大的提升 ...
- [HeadFrist-HTMLCSS学习笔记]第五章认识媒体:给网页添加图像
[HeadFrist-HTMLCSS学习笔记]第五章认识媒体:给网页添加图像 干货 JPEG.PNG.GIF有何不同 JPEG适合连续色调图像,如照片:不支持透明度:不支持动画:有损格式 PNG适合单 ...
- Leetcode 5281. 使结果不超过阈值的最小除数
又一次参赛,除了第一道Easy题和第二道Medium外,剩下的两道在有限时间内,要么没思路,要么思路不对,超时,要么有思路调试出错,还需多加练习! (这次的第三题,在循环从1开始,直到找到满足地为止, ...
- 理解UnrealBuildTool
转自:https://zhuanlan.zhihu.com/p/57186557 介绍 虚幻引擎是当前比较流行的游戏开发引擎之一,许多流行的游戏都是虚幻引擎开发的. 然而“引擎”这个词在行业中的定义比 ...