hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rachna Jotwani Bakhru" <>
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>

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

<description>The path to the Kerberos Keytab file containing the metastore thrift server’s
service principal.</description>
< /property>

<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?





From: Rachna Jotwani Bakhru [] 
Sent: Thursday, October 15, 2015 6:25 PM
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
HiveConf hcatConf = new HiveConf();
hcatConf.setVar(HiveConf.ConfVars.METASTOREURIS, “thrift://”);
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.


View raw message