Spark 1.6.3 thriftServer 支持 ldap 配置

  • hive-site.xml配置
[idc_xudalei1@CDNDC-213128087 conf]$ cat hive-site.xml 
<?xml version="1.0" encoding="UTF-8"?>
<!--Autogenerated by Cloudera Manager-->
<configuration>
  <property>
    <name>hive.metastore.uris</name>
    <value>thrift://******:9083</value>
  </property>
  <property>
</configuration>
  • 启动命令
start-thriftserver.sh  --master yarn \
 --hiveconf  hive.metastore.uris="thrift://metastoreserverip:9083" \  --hiveconf   hive.server2.authentication=LDAP \
--hiveconf  hive.server2.authentication.ldap.url  "ldap://ldapserverip:10389/"  \
  --hiveconf  hive.server2.authentication.ldap.baseDN  "ou=People,dc=idc,dc=test,dc=cn"
  • 测试
 beeline 
Beeline version 1.6.3 by Apache Hive
beeline> !connect jdbc:hive2://*****:10000/default
Connecting to jdbc:hive2://*****:10000/default
Enter username for jdbc:hive2://******:10000/default: xudalei1
Enter password for jdbc:hive2://******:10000/default: ******
log4j:WARN No appenders could be found for logger (org.apache.hive.jdbc.Utils).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
Connected to: Spark SQL (version 1.6.3)
Driver: Spark Project Core (version 1.6.3)
Transaction isolation: TRANSACTION_REPEATABLE_READ
0: jdbc:hive2://****:10000/default>
0: jdbc:hive2://***:10000/default> use test;
0: jdbc:hive2://***:10000/default> select * from test1;
+-----------+-------------+------------+------------+--+
| test1.id  | test1.name  | test1.age  | test1.tel  |
+-----------+-------------+------------+------------+--+
| 1         | ouyang      | NULL       | oooo       |
| 2         | ouyang      | NULL       | oooo       |
| 3         | ouyang      | NULL       | oooo       |
| 4         | ouyang      | NULL       | oooo       |
| 5         | ouyang      | NULL       | oooo       |
| NULL      | NULL        | NULL       | NULL       |
+-----------+-------------+------------+------------+--+
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值