Exemplo n.º 1
0
 /** @return region load metrics */
 public Map<byte[], RegionLoad> getRegionsLoad() {
   Map<byte[], RegionLoad> regionLoads = new TreeMap<byte[], RegionLoad>(Bytes.BYTES_COMPARATOR);
   for (ClusterStatusProtos.RegionLoad rl : serverLoad.getRegionLoadsList()) {
     RegionLoad regionLoad = new RegionLoad(rl);
     regionLoads.put(regionLoad.getName(), regionLoad);
   }
   return regionLoads;
 }
Exemplo n.º 2
0
 public ServerLoad(ClusterStatusProtos.ServerLoad serverLoad) {
   this.serverLoad = serverLoad;
   for (ClusterStatusProtos.RegionLoad rl : serverLoad.getRegionLoadsList()) {
     stores += rl.getStores();
     storefiles += rl.getStorefiles();
     storeUncompressedSizeMB += rl.getStoreUncompressedSizeMB();
     storefileSizeMB += rl.getStorefileSizeMB();
     memstoreSizeMB += rl.getMemstoreSizeMB();
     storefileIndexSizeMB += rl.getStorefileIndexSizeMB();
     readRequestsCount += rl.getReadRequestsCount();
     writeRequestsCount += rl.getWriteRequestsCount();
     rootIndexSizeKB += rl.getRootIndexSizeKB();
     totalStaticIndexSizeKB += rl.getTotalStaticIndexSizeKB();
     totalStaticBloomSizeKB += rl.getTotalStaticBloomSizeKB();
     totalCompactingKVs += rl.getTotalCompactingKVs();
     currentCompactedKVs += rl.getCurrentCompactedKVs();
   }
 }