1. 방식

Anonymous with SASL

Anonymous without SASL

Kerberos (GSSAPI)

LDAP

PAM

Custom


2. kerberos 설정  (hive-site.xml)


<property>

  <name>hive.server2.authentication</name>

  <value>KERBEROS</value>

</property>

<property>

  <name>hive.server2.authentication.kerberos.principal</name>

  <value> <<Kerberos principle for HiveServer2>> </value>

</property>

<property>

  <name>hive.server2.authentication.kerberos.keytab</name>

  <value> <<Keytab for server principal>> </value>

</property>



* hive2 접속 방법

jdbc:hive2://<hostname>:<port>/<database>;principal=<Kerberos_Server_Principal_of_HiveServer2>.


jdbc:hive2://hiveserver_hostname:10000/default;principal=hive/hiveserver_hostname@YOUR-REALM.COM


$HIVE_HOME/bin/beeline

beeline> !connect jdbc:hive2://hiveserver_hostname:10000/default;principal=hive/ hiveserver_hostname@YOUR-REALM.COM org.apache.hive.jdbc.HiveDriver


String url = " jdbc:hive2://hiveserver_hostname:10000/default;principal=hive/ hiveserver_hostname@YOUR-REALM.COM"

Connection con = DriverManager.getConnection(url);



3. ldap 접근방법 (hive-site.xml)



<property>

  <name>hive.server2.authentication</name>

  <value>LDAP</value>

</property>

<property>

  <name>hive.server2.authentication.ldap.url</name>

  <value>LDAP_URL</value>

</property>

<property>

  <name>hive.server2.authentication.ldap.baseDN</name>

  <value>LDAP_BaseDN</value>

</property>

<property>

  <name>hive.server2.authentication.ldap.Domain</name>

  <value>LDAP_Domain</value>

</property>



jdbc:hive2://<HOSTNAME>:<PORT>/<DATABASE>;user=<USER_NAME>;password=<PASSWORD>

'NoSQL > Hive' 카테고리의 다른 글

hive skip line 설정  (0) 2017.02.16
hive avro table 자동적재 using sqoop  (0) 2016.11.11
Hive authorization  (0) 2016.10.16
Hive DML  (0) 2016.10.15
Hive DDL  (0) 2016.10.15

+ Recent posts