Spark 1.6.3 thriftServer 支持 ldap 配置

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/u011291159/article/details/53126774
  • 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       |
+-----------+-------------+------------+------------+--+

猜你喜欢

转载自blog.csdn.net/u011291159/article/details/53126774