Removing Hive Metastore Password from Hive Configuration

来源:互联网 发布:部分图片来源于网络 编辑:程序博客网 时间:2024/05/17 09:28

1.Set up the CredentialProvider to store the Hive Metastore password, using the key javax.jdo.option.ConnectionPassword (the same key as used in the Hive configuration). 

$ hadoop credential create javax.jdo.option.ConnectionPassword -provider jceks://file/usr/lib/hive/conf/hive.jceksEnter password: Enter password again: javax.jdo.option.ConnectionPassword has been successfully created.org.apache.hadoop.security.alias.JavaKeyStoreProvider has been updated.

2.Update the Hive configuration to use the designated CredentialProvider. For example to use our /usr/lib/hive/conf/hive.jceks file:

 <!-- Configure credential store for passwords-->  <property>    <name>hadoop.security.credential.provider.path</name>    <value>jceks://file/usr/lib/hive/conf/hive.jceks</value>  </property>

3.Remove the Hive Metastore password entry (javax.jdo.option.ConnectionPassword) from the Hive configuration. The CredentialProvider will be used instead.



4.Restart Hive Metastore Server/HiveServer2.