How to check Zookeeper connection in HBase? -


i want quick connection check zookeeper after creating configurations , before establishing connection hbase master java code. hbase api method checking zookeeper connection status in cluster?

try following code

configuration config =  hbaseconfiguration.create(); config.set("hbase.zookeeper.quorum", "hbase"); config.set("hbase.zookeeper.property.clientport","2181"); 

after configured connection, can test it, using

hbaseadmin.checkhbaseavailable(config); 

it test connection database, if zookeeper doesn't work error printed saying there problem zookeeper.


Comments

Popular posts from this blog

mysql - Dreamhost PyCharm Django Python 3 Launching a Site -

java - Sending SMS with SMSLib and Web Services -

java - How to resolve The method toString() in the type Object is not applicable for the arguments (InputStream) -