hive beeline使用说明

摘要:
//cwiki.apache.org/convergence/display/Hive/HiveServer2+客户端#HiveServer2Clients PythonClients:10000$beeline-uhdbc:

参考 https://cwiki.apache.org/confluence/display/Hive/HiveServer2+Clients#HiveServer2Clients-PythonClient

https://cwiki.apache.org/confluence/display/Hive/Setting+Up+HiveServer2#SettingUpHiveServer2-PythonClientDriver

Example:
1. Connect using simple authentication to HiveServer2 on localhost:10000
$ beeline -u jdbc:hive2://localhost:10000 username password

2. Connect using simple authentication to HiveServer2 on hs.local:10000 using -n for username and -p for password
$ beeline -n username -p password -u jdbc:hive2://hs2.local:10012

3. Connect using Kerberos authentication with hive/localhost@mydomain.com as HiveServer2 principal  (现在一般生产集群都是用Kerberos 认证)
$ beeline -u "jdbc:hive2://hs2.local:10013/default;principal=hive/localhost@mydomain.com

4. Connect using SSL connection to HiveServer2 on localhost at 10000
$ beeline jdbc:hive2://localhost:10000/default;ssl=true;sslTrustStore=/usr/local/truststore;trustStorePassword=mytruststorepassword

5. Connect using LDAP authentication
$ beeline -u jdbc:hive2://hs2.local:10013/default <ldap-username> <ldap-password>

后面就像sql一样使用

hive beeline使用说明第1张

  python client:

https://github.com/cloudera/impyla(实测python3.7装不上)

https://github.com/dropbox/PyHive

能装上,但是对kerberos不是很友好

这个链接是pyhive针对kerberos认证讨论的操作方法

  1. Install kerberos on your own computer
  2. Setup kerberos on your computer so that it connects to the remote kerberos server (/etc/krb5.conf)
  3. Given a keytab file (provided by your kerberos administrator), you can authenticate your computer to the remote kerberos server using kinit -kt your.keytab username@YOUR_KERBEROS_REALM
  4. You can check that you have a valid kerberos ticket using klist
  5. You can now launch pyhive with kerberos.

免责声明:文章转载自《hive beeline使用说明》仅用于学习参考。如对内容有疑问,请及时联系本站处理。

上篇Maven知识整理webstorm 永久激活方法下篇

宿迁高防,2C2G15M,22元/月;香港BGP,2C5G5M,25元/月 雨云优惠码:MjYwNzM=

相关文章

数据科学家含金量最高的5个数据科学认证,先马后看!

  数据科学家含金量最高的5个数据科学认证,先马后看!   尽管关于这个话题的文章不计其数,但文本作者想要找寻那种为大部分数据科学家所用而又有特色的工具及其认证。这些认证有的是免费的,有的比较便宜,但都值得尝试。   不过,这还是要取决于你在数据科学领域的关注重点和发展方向。在数据科学从业的道路上,每个人想要获得证书的原因有很多;有的证书可能很直白,例如数...

Apache用户认证方法汇总(转载)

简介:这是Apache用户认证方法汇总(转载)的详细页面,介绍了和php,有关的知识、技巧、经验,和一些php源码等。 frameborder='0' src='http://biancheng.dnbcw.info/pingjia.php?id=322022' scrolling='no'> Apache用户认证方法汇总 一.基本的Apac...

telent三种认证及vlan简单划分

实验一 telent三种认证方式登录 实验拓扑图如下: 操作过程: 1.认证模式为none R1操作:       1.system-view进入系统试图2.telnet server enable开启Telnet服务3.改名sys R14.int G0/0端口5.ip address x.x.x.x xx 配置ip地址6.exit退出对R2操作:1.s...

数字证书在web应用中实现登陆

1数字证书登录认证的优点 作为企业信息系统的第一道大门,身份认证是确保企业信息资源只能被合法用户所访问的重要保障。 传统的口令认证方式虽然简单,但是由于其易受到窃听、重放等攻击的安全缺陷,使其已无法满足当前复杂网络环境下的安全认证需求。 传统账号+口令登录的弊端: 1.         口令易被猜测。由于有的用户为了方便记忆,使用非常简单的口令,比如“12...

.net core Identity学习(三) 第三方认证接入

简介 .net core在nuget中提供了微软、google、Facebook和twitter的Identity接入包,这里主要以MS作为例子。 微软官方文档可以参见这个链接,但是.net core的文档个人认为作为教学并不是特别好,利用了很多VS中的功能隐藏掉了很多细节,当当当点几下,就可以认证了,对于需要自定义一些流程的情况,可能会不方便,而且也不太...

QQ群认证 人数再度扩容 权限随之升级

群排名,得资源得天;之于排名,群容量有杠杆意义。      而今,流量分散,打法完全无法集中,全平台战略,越发凸显。QQ群,已是必争之地。   去年,Q群霸屏春天,一切那么顺其自然;而今,除了拼资源,还是拼资源。除去小号资源,于等级之外,认证一出,必须拿下。   认证QQ群有什么用?   为毛要认证,就凭你随便呱唧几句?说得这么流弊,认证QQ群具体有哪些...