Hi All, I have successfully Kerberized the CDH5 & Hive. Now I can do a kinit & then issue hive queries.
Next I wanted to access hive remotely from standalone java client using keytab file so that kinit (or credential prompt) can be avoided. I have written a java code with following lines (based on input from cdh-user google group<https://groups.google.com/a/cloudera.org/forum/#!topic/cdh-user/S7nPFx0w90U>) to solve the above problem, but after that I am getting GSS initiate failed exception. Configuration conf = new Configuration(); conf.addResource(new java.io.FileInputStream("/installer/hive_jdbc/core-site.xml")); //file placed at this path SecurityUtil.login(conf,"/path/to/my/keytab/file/user.keytab", "user@domain"); I have also posted the same problem on this<https://groups.google.com/a/cloudera.org/forum/#!topic/cdh-user/S7nPFx0w90U> URL, sample code & logs are posted here. As per the apache hive wiki on this<https://cwiki.apache.org/confluence/display/Hive/HiveServer2+Clients#HiveServer2Clients-JDBCClientSetupforaSecureCluster> page, a valid ticket needs to be there in ticket cache for hitting a kerberized hive. Can I bypass this & use a keytab for hitting kerberized hive from a standalone java program? Kindly provide some input/pointers/examples to solve this. Kind regards, Keshav C Savant _____________ The information contained in this message is proprietary and/or confidential. If you are not the intended recipient, please: (i) delete the message and all copies; (ii) do not disclose, distribute or use the message in any manner; and (iii) notify the sender immediately. In addition, please be aware that any message addressed to our domain is subject to archiving and review by persons other than the intended recipient. Thank you.