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 ...
随机推荐
- SpringMVC中控制器接收JSP页面表单的参数接收方式详解及细节注意(400错误)
控制器方法中参数的接收 (1)以前的参数接收: String param = req.getParameter(name): (2)SpringMVC简化这个操作,只需要给控制器方法添加参数即可 a ...
- 使用pipenv管理虚拟环境
使用pipenv管理虚拟环境 安装 pip install pipenv 命令介绍 pipenv --help Usage: pipenv [OPTIONS] COMMAND [ARGS]... Op ...
- 使用adb 命令(atrace)抓起systrace的方法。
adb shell atrace -c -b --async_start -z gfx 1. 执行查看adb shell atrace 功能 atrace --h atrace: invalid op ...
- destoon开发笔记-调取资讯标题图
今天刚申请博客园的博客,申请速度挺快的.之前我的文章都是发在自己搭建的博客网站,但是是香港服务器,不想续费了,所以就关闭了.之前的数据也没有了,挺可惜了.不过既然加入博客园的大家庭,我就在这每天记录工 ...
- mysql之子查询、视图、事务及pymysql等
数据准备 CREATE TABLE `emp` ( `id` int(0) NOT NULL AUTO_INCREMENT, `name` varchar(10) NOT NULL, `gender` ...
- 前端html页面,手机查看
在写前端页面中,经常会在浏览器运行HTML页面,从本地文件夹中直接打开的一般都是file协议,当代码中存在http或https的链接时,HTML页面就无法正常打开,为了解决这种情况,需要在在本地开启一 ...
- Eye sketch - ES
An interesting painting program, the interface is a blank drawing board, touch the bottom of the r ...
- netlify搭建静态站+https
转载[大雄的学习人生 - 原文地址:https://www.cnblogs.com/codernie/p/9062104.html] 一.使用github或者gitlab登陆netlify 首先,打开 ...
- vue 实现模块上移下移 实现排序
效果图 上移 下移 首先想到的是 数组的相互替换嘛 <template> <div> <div class="box" v-for="(it ...
- jquery设置bootstrap-select的默认选中值
<select id="mSelect"></select> $("#mSelect").val(["1",&quo ...