Support Questions
Find answers, ask questions, and share your expertise
Check out our newest addition to the community, the Cloudera Innovation Accelerator group hub.

hive udf with hbase connection on a secure cluster

Rising Star

I am trying to write a hive udf which connects to hbase table. But, the program is failing to access due to security exception and throwing below: Unable to obtain password from user at

Below is the code i am trying ...

config = HBaseConfiguration.create();

        config.set("", "Kerberos");
        config.set("", "kerberos");


        // Point to the krb5.conf file.
        System.setProperty("", "src/main/resources/krb5.conf");
        System.setProperty("", "true");
        UserGroupInformation.loginUserFromKeytab("pricipal", "keytab");

        connection = ConnectionFactory.createConnection(config);

can someone please share ur thoughts and help me fix the issue ....


Super Mentor

@Raja A

Can you please check if you are using the correct keytab? And able to do "kinit" to get the ticket?

In your code i do not see that you are passing the keytab path anywhere. May be you can look at the following example that gives an example of the same: