Is it possible to check whether HBase region server is up or down through Java code in our program while writing some data to HBase from Storm....
Asked
Active
Viewed 2,375 times
2 Answers
1
You can use ping
from your Java code :)
More info at How to ping via JAVA
-
we can ping to localhost which is our ambari server but sometimes ambari is up and running but it may happen that our hbase region server or master is down....so how to predict that our region server is up??? – Rishi Arora May 11 '15 at 08:53
-
You can ping hbase region serves as well. Get the ips of the region servers and ping them – Abhishek May 11 '15 at 09:09
0
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());

Yosser Abdellatif Goupil
- 789
- 3
- 10
- 26