hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Schäfer <syrious3...@hotmail.de>
Subject Capturing RegionServerMetrics during inserts
Date Sat, 07 Jan 2012 15:51:50 GMT

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 = new HBaseAdmin(config);
        HTable table = new HTable(config, TABLE_NAME);
        
        Map<HRegionInfo, HServerAddress> regionInfo = table.getRegionsInfo();
        
        RegionServerMetrics metrics = new RegionServerMetrics();
        MetricsIntValue value =
 metrics.requests;
        
        while(true){
            System.out.println(metrics.toString());
            Thread.sleep(1000);
        }
    }

But it prints just:

requests=0,
 regions=0, stores=0, storefiles=0, storefileIndexSize=0, 
memstoreSize=0, compactionQueueSize=0, flushQueueSize=0, usedHeap=14, 
maxHeap=865, blockCacheSize=0, blockCacheFree=0, blockCacheCount=0, 
blockCacheHitCount=0, blockCacheMissCount=0, blockCacheEvictedCount=0, 
blockCacheHitRatio=0, blockCacheHitCachingRatio=0

Although the WebGUI of HMaster shows that there are requests for all Region Servers.

The TABLE_NAME is equal for the inserting app and the metrics app.

Any suggestions? 		 	   		  
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message