hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rachna Jotwani Bakhru" <rjotw...@dag.com>
Subject RE: Hcatalog api - kerberos and knox
Date Tue, 20 Oct 2015 03:13:07 GMT
*	If my hive-site.xml contains the following properties
< property>
<name>hive.metastore.uris</name>
<value>thrift://server1.example.com:9083</value>
</property>

<property>
<name>hive.metastore.sasl.enabled</name>
<value>true</value>
<description>If true, the metastore thrift interface will be secured with SASL. Clients
must authenticate with Kerberos.</description>
< /property>

<property>
<name>hive.metastore.kerberos.keytab.file</name>
<value>/etc/hive/conf/hive.keytab</value>
<description>The path to the Kerberos Keytab file containing the metastore thrift server’s
service principal.</description>
< /property>

<property>
<name>hive.metastore.kerberos.principal</name>
<value>hive/_HOST@example.COM</value>
<description>The service principal for the metastore thrift server. The special string
_HOST will be replaced automatically with the correct host name.</description>
< /property>

how do I configure the HCatClient to connect to hive?

Thanks

Rachna

 

 

From: Rachna Jotwani Bakhru [mailto:rjotwani@dag.com] 
Sent: Thursday, October 15, 2015 6:25 PM
To: user@hive.apache.org
Subject: Hcatalog api - kerberos and knox

 

I have a java application which reads hive metadata using hcatalog apis. If I need to read
metadata from a hive database on a cluster with Kerberos and knox, would the following configuration
work?
HiveConf hcatConf = new HiveConf();
hcatConf.setVar(HiveConf.ConfVars.METASTOREURIS, “thrift://server1.example.com:9083”);
hcatConf.setVar(HiveConf.ConfVars.METASTORE_KERBEROS_PRINCIPAL, “hive/_HOST@example.COM
<mailto:hive/_HOST@example.COM> ”);
hcatConf.setVar(HiveConf.ConfVars.METASTORE_KERBEROS_KEYTAB_FILE, “<local_path>/hive.keytab”);
hcatConf.setVar(HiveConf.ConfVars.METASTORE_USE_THRIFT_SASL, “true”);

HCatClient  hcatClient = HCatClient.create(new Configuration(hcatConf));
I will be running the Java program from a remote windows machine.

 


Mime
View raw message