How to check Hbase realm server up or down

Is it possible to check if the HBase realm server is up or down the Java code in our program when writing some data to HBase from Storm ....

+3
hbase hadoop apache-storm


source to share


2 answers


You can use ping

from your Java code :)



More info on How to ping through JAVA

+1


source to share


    Configuration conf = HBaseConfiguration.create();
    conf.set("hbase.master", "10.2.210.46:60000");
    conf.set("hbase.zookeeper.quorum","10.2.210.46");
    conf.set("hbase.zookeeper.property.clientPort", "2181");
    admin = new HBaseAdmin(conf); 
    System.out.println(admin.isMasterRunning());

      



0


source to share







All Articles
Loading...
X
Show
Funny
Dev
Pics