๐Ÿ’ปTech/๐ŸHIVE

[Hive] beeline ๊ณ„์ •,ํŒจ์Šค์›Œ๋“œ ์—†์ด ์ž๋™ ๋กœ๊ทธ์ธ ์„ค์ •

_viper_ 2019. 9. 23. 17:44
๋ฐ˜์‘ํ˜•

hive 3.0 ๊ฐ™์€ ๊ฒฝ์šฐ ๋ชจ๋“  hive ์ ‘์†์„ beeline์œผ๋กœ ์ˆ˜ํ–‰ํ•ด์•ผํ•˜๋Š”๋ฐ ๋งค๋ฒˆ ๊ณ„์ •,ํŒจ์Šค์›Œ๋“œ ์ž…๋ ฅํ•˜๋Š” ๋ถˆํŽธํ•จ๊ณผ ์‰˜ ์ž‘์„ฑํ•  ๊ฒฝ์šฐ ๋ณด์•ˆ๋ฌธ์ œ๊ฐ€ ์žˆ๋Š”๋ฐ ์•„๋ž˜ xml ํŒŒ์ผ์„ ~/.beeline/ ๋ฐ‘์— ์ƒ์„ฑํ•ด์ฃผ๋ฉด ์ž๋™ ๋กœ๊ทธ์ธ์ด ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค.

 

๐Ÿ’ก LDAP ์ž๋™ ์ธ์ฆ ๋ฐฉ๋ฒ•

vi /home/admin/.beeline/beeline-hs2-connection.xml
---------------------------------------------------------------
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<configuration>
<property>
  <name>beeline.hs2.connection.user</name>
  <value>hive</value>
</property>
<property>
  <name>beeline.hs2.connection.password</name>
  <value>hive_password</value>
</property>
</configuration>
---------------------------------------------------------------

## ๋ณธ์ธ๋งŒ ์ฝ์„ ์ˆ˜ ์žˆ๋„๋ก ์ ์šฉ
chmod 600 /home/admin/.beeline/beeline-hs2-connection.xml

์ฐธ์กฐ ๐Ÿ”—: https://cwiki.apache.org/confluence/display/Hive/HiveServer2+Clients

 

๐Ÿ“Œ ์ปค๋ฒ„๋กœ์Šค ์ž๋™ ์ธ์ฆ ๋ฐฉ๋ฒ•

vi /home/admin/.beeline/beeline-hs2-connection.xml
------------------------------------------------------------
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<configuration>
<property>
  <name>beeline.hs2.connection.principal</name>
  <value>hive/local.example.com@DOMAIN.COM</value>
</property>
</configuration>
------------------------------------------------------------

## ๋ณธ์ธ๋งŒ ์ฝ์„ ์ˆ˜ ์žˆ๋„๋ก ์ ์šฉ
chmod 600 /home/admin/.beeline/beeline-hs2-connection.xml