1) Add below line in hive-site.xml
[hadoop@adp031 conf]$ vim /usr/local/hadoop/hive/conf/hive-site.xml
<property>
<name>hive.server2.authentication</name>
<value>LDAP</value>
</property>
<property>
<name>hive.server2.authentication.ldap.url</name>
<value>ldap://adp034</value>
</property>
<property>
<name>hive.server2.authentication.ldap.baseDN</name>
<value>ou=Users,dc=tuxhub,dc=com</value>
</property>
2) Restart hiveserver2.
[hadoop@adp031 ~]$ nohup hiveserver2 &
[hadoop@adp031 conf]$ beeline
Beeline version 1.2.1 by Apache Hive
beeline> !connect jdbc:hive2://adp031:10000
Connecting to jdbc:hive2://adp031:10000
Enter username for jdbc:hive2://adp031:10000: nitin
Enter password for jdbc:hive2://adp031:10000: *****
Connected to: Apache Hive (version 1.2.1)
Driver: Hive JDBC (version 1.2.1)
Transaction isolation: TRANSACTION_REPEATABLE_READ
0: jdbc:hive2://adp031:10000>
0: jdbc:hive2://adp031:10000> show tables;
+-----------+--+
| tab_name |
+-----------+--+
| hive1 |
+-----------+--+
1 row selected (0.326 seconds)
0: jdbc:hive2://adp031:10000>
No comments:
Post a Comment