Capturing RegionServerMetrics during inserts

2012-01-07 Thread Christian Schäfer
Hello, I want to measure requests per second for each Region Server during inserts on a table that is spread over this Region Servers. So during inserts I run local java app to grab the Region Server metrics: public void getRegionServerMetrics() throws Exception{ HBaseAdmin admin = n

Re: Capturing RegionServerMetrics during inserts

2012-01-08 Thread Alex Baranau
Hi, According to your code: > RegionServerMetrics metrics = new RegionServerMetrics(); I think that's why it is always empty. I believe that the right way to get those stats is to use data exposed via JMX by the RegionServer. Alternatively you can poll RegionServer web ui periodically and pars

Re: Capturing RegionServerMetrics during inserts

2012-01-08 Thread Mikael Sitruk
If you just want the load you can do the below HBaseAdmin admin; try { admin = new HBaseAdmin(m_hbConfig); for (HServerInfo info : admin.getMaster().getClusterStatus().getServerInfo()){ System.out.println(info.getServerName() + "-->" + info.getLoad()); } } catch (Exception e) { throw new Except

Re: Capturing RegionServerMetrics during inserts

2012-01-09 Thread Christian Schäfer
} } Still tried it on two different clusters from different networks. - Perfect...thats exactly what I was looking for. Thanks a lot for the working code :-) Von: Mikael Sitruk An: user@hbase.apache.org Gesendet: 18:01 Sonntag, 8.Januar 2012 Betreff: Re: Capturing Regi

Re: Capturing RegionServerMetrics during inserts

2012-01-10 Thread Mikael Sitruk
); >} >} >} > > Still tried it on two different clusters from different networks. > - > > Perfect...thats exactly what I was looking for. > Thanks a lot for the working code :-) > Von: Mikael Sitruk > An: user@hbase.apache.org >

Re: Capturing RegionServerMetrics during inserts

2012-01-10 Thread Christian Schäfer
from different networks. > - > > Perfect...thats exactly what I was looking for. > Thanks a lot for the working code :-) > Von: Mikael Sitruk > An: user@hbase.apache.org > Gesendet: 18:01 Sonntag, 8.Januar 2012 > Betreff: Re: Capturing RegionServerMetric