public HFileStoreStatistics(StatisticsFactory factory, String typeName, String name) { StatisticsTypeFactory tf = StatisticsTypeFactoryImpl.singleton(); StatisticDescriptor bcMisses = tf.createLongCounter("blockCacheMisses", "The total number of block cache misses", "misses"); StatisticDescriptor bcHits = tf.createLongCounter("blockCacheHits", "The total number of block cache hits", "hits"); StatisticDescriptor bcCached = tf.createLongGauge("blocksCached", "The current number of cached blocks", "blocks"); StatisticDescriptor bcBytesCached = tf.createLongGauge("blockBytesCached", "The current number of bytes cached", "bytes"); StatisticDescriptor bcBytesEvicted = tf.createLongCounter("blockBytesEvicted", "The total number of bytes cached", "bytes"); StatisticsType type = tf.createType(typeName, "Statistics about structured I/O operations for a region", new StatisticDescriptor[] { bcMisses, bcHits, bcCached, bcBytesCached, bcBytesEvicted }); blockCache = new CacheOperation(bcMisses.getId(), bcHits.getId(), bcCached.getId(), bcBytesCached.getId(), bcBytesEvicted.getId()); stats = factory.createAtomicStatistics(type, name); }
public HFileStoreStatistics(StatisticsFactory factory, String typeName, String name) { StatisticsTypeFactory tf = StatisticsTypeFactoryImpl.singleton(); StatisticDescriptor bcMisses = tf.createLongCounter("blockCacheMisses", "The total number of block cache misses", "misses"); StatisticDescriptor bcHits = tf.createLongCounter("blockCacheHits", "The total number of block cache hits", "hits"); StatisticDescriptor bcCached = tf.createLongGauge("blocksCached", "The current number of cached blocks", "blocks"); StatisticDescriptor bcBytesCached = tf.createLongGauge("blockBytesCached", "The current number of bytes cached", "bytes"); StatisticDescriptor bcBytesEvicted = tf.createLongCounter("blockBytesEvicted", "The total number of bytes cached", "bytes"); StatisticsType type = tf.createType(typeName, "Statistics about structured I/O operations for a region", new StatisticDescriptor[] { bcMisses, bcHits, bcCached, bcBytesCached, bcBytesEvicted }); blockCache = new CacheOperation(bcMisses.getId(), bcHits.getId(), bcCached.getId(), bcBytesCached.getId(), bcBytesEvicted.getId()); stats = factory.createAtomicStatistics(type, name); }