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 ...
随机推荐
- 利用 FluentScheduler 启动定时器计划任务
FluentScheduler 是什么? Automated job scheduler with fluent interface. 这是作者在 Github 上的介绍,就是一个定时任务管理器.在 ...
- 使用Qemu运行Ubuntu文件系统 —— 搭建SVE学习环境(2)
开发环境 PC:ubuntu18.04 Qemu:4.1 Kernel:Linux-5.2 概述 由于要学习ARM的SVE技术,但是目前还没有支持SVE指令的板子,所以只能用Qemu来模拟,但是发现Q ...
- 201871010121 王方 《面向对象程序设计(java)》 第二周学习总结
这个作业属于哪个课程 https://www.cnblogs.com/nwnu-daizh/ 这个作业的要求在哪里 https://www.cnblogs.com/nwnu-daizh/p/11475 ...
- vue大文件上传控件选哪个好?
需求: 项目要支持大文件上传功能,经过讨论,初步将文件上传大小控制在20G内,因此自己需要在项目中进行文件上传部分的调整和配置,自己将大小都以20G来进行限制. PC端全平台支持,要求支持Window ...
- ZBX_TCP_READ() time out windows
zabbix 客户端无法推送数据,日志显示在启动的时候ZBX_TCP_READ() time out windows, 场景:agent 到proxy的10051通,proxy到agnet的10050 ...
- Stuts 文件上传
Stuts 文件上传 三种上传方案 1.上传到tomcat服务器 上传图片的存放位置与tomcat服务器的耦合度太高 2.上传到指定文件目录,添加服务器与真实目录的映射 ...
- 云服务器使用: 为域名申请SSl证书
注:咱们平时访问网站 有的是http 有的是 https https就是说使用了SSL访问 然后就是等着..... 假设可以了 然后就会有各个软件使用的证书,然后根据自己安装的软件下载证书
- 30-ESP8266 SDK开发基础入门篇--SPI
这节只是做记录, 整个的教程呢,重新整理下 教程有点乱,需要再细分一下 这节只是做一下我使用其SPI的记录 还是老样子,看人家LUA源码里面怎么使用的 注意哈,对于8266 SDK的学习我还是建议大家 ...
- ESA2GJK1DH1K微信小程序篇: 小程序实现MQTT封包源码使用说明
说明 我为了后期能够快速的让小程序实现MQTT,我做了一个MQTT的封装. 功能的封装有助于后期快速的开发,还方便咱维护. 我后期的所有代码皆使用此封装库, 这一节,我就详细的介绍我封装的MQTT.j ...
- selenium--单选框和复选框的操作
单选框操作 from selenium import webdriver import unittest class Test_radio(unittest.TestCase): def test_S ...