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://server:9083”);
hcatConf.setVar(HiveConf.ConfVars.METASTORE_KERBEROS_PRINCIPAL, 
“hive/_h...@your-realm.com”);
hcatConf.setVar(HiveConf.ConfVars.METASTORE_KERBEROS_KEYTAB_FILE, 
“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.

 

Reply via email to