You can use the following method from HBaseAdmin: public ClusterStatus getClusterStatus() throws IOException {
where ClusterStatus has getter for retrieving live server count: public int getServersSize() { and getter for retrieving dead server count: public int getDeadServers() { FYI On Thu, Jan 19, 2017 at 4:52 AM, kiran <kiran.sarvabho...@gmail.com> wrote: > Dear All, > > Is there a way to check hbase cluster health (Master, Zookeeper, > Regionservers) using java api. I have seen HBaseAdmin.clusterHealth but it > checks for the health for master and zookeeper only. > > My use case is slightly different. > > I need to monitor the health of hbase cluster including region servers for > every 2 min. 2min is my turn around time and I can't go beyond. > > If X%(30-70) of regionservers fail or master or zookeeper fails I will > treat hbase cluster as down. > > Hbase version : 0.98.6 > > -- > Thank you > Kiran Sarvabhotla > > -----Even a correct decision is wrong when it is taken late >