Support Questions

Find answers, ask questions, and share your expertise

What is zookeeper base path and how it is get created?

avatar
Contributor

I would like to understand where is zookeeper base path is available and how do i check it?

in hbase-site.xml it is configured[zookeeper.znode.parent] as /hbase-secure, but i dont see any hdfs folders on that name.

Is it something automatically getting created? we are getting some weird error related to this path.

6 REPLIES 6

avatar
Super Guru

/hbase-secure is not hdfs path it is zk node, please check this zk node using zkCli

avatar
Contributor
@Rajkumar Singh

we are getting null pointer exception, when we try to access the table programmatically, but when we try with hbase console its working, what could be the issue? when i checked in zkcli get /hbase-secure, the data length is 0.

avatar
Super Guru

looks you have secure env, the reason of NPE could be accessiblity of your zknode, how you are accessing zk node.

avatar
Contributor

We are just trying to read the Hbase table using HortonWorks Hbase connector, we also tried newHadoopAPI, all are same problem.

avatar

bq. we are getting null pointer exception, when we try to access the table programmatically, but when we try with hbase console its working, what could be the issue?

can you check that your application also has same hbase-site.xml in classpath.

bq.when i checked in zkcli get /hbase-secure, the data length is 0

when you do "ls" on your parent znode /hbase-secure by using zkcli, you should see following nodes. if they don't exists ,it means your cluster if formatted or running on different znode.(check all znodes at root by doing "ls /")

[zk: localhost:2181(CONNECTED) 1] ls /hbase-secure
 [meta-region-server, backup-masters, table, draining, region-in-transition, table-lock, running, master, namespace, hbaseid, online-snapshot, replication, splitWAL, recovering-regions, rs, flush-table-proc]

avatar
Guru

You should have hbase-site.xml in your classpath for the java application. Please read: https://community.hortonworks.com/articles/4091/hbase-client-application-best-practices.html