本文整理汇总了Java中org.apache.hadoop.hbase.io.hfile.BlockType.BlockCategory.values方法的典型用法代码示例。如果您正苦于以下问题:Java BlockCategory.values方法的具体用法?Java BlockCategory.values怎么用?Java BlockCategory.values使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.hadoop.hbase.io.hfile.BlockType.BlockCategory
的用法示例。
在下文中一共展示了BlockCategory.values方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: flushOnCacheHitMetrics
import org.apache.hadoop.hbase.io.hfile.BlockType.BlockCategory; //导入方法依赖的package包/类
/**
* Flush the on cache hit metrics;
*/
private void flushOnCacheHitMetrics() {
for (BlockCategory blockCategory : BlockCategory.values()) {
for (boolean isCompaction : BOOL_VALUES) {
flushCertainOnCacheHitMetrics (blockCategory, isCompaction);
}
}
if (this != ALL_SCHEMA_METRICS) {
ALL_SCHEMA_METRICS.flushOnCacheHitMetrics();
}
}
示例2: printMetricNames
import org.apache.hadoop.hbase.io.hfile.BlockType.BlockCategory; //导入方法依赖的package包/类
void printMetricNames() {
for (BlockCategory blockCategory : BlockCategory.values()) {
for (boolean isCompaction : BOOL_VALUES) {
for (BlockMetricType metricType : BlockMetricType.values()) {
int i = getBlockMetricIndex(blockCategory, isCompaction, metricType);
LOG.debug("blockCategory=" + blockCategory + ", "
+ "metricType=" + metricType + ", isCompaction=" + isCompaction
+ ", metricName=" + blockMetricNames[i]);
}
}
}
}
示例3: SchemaMetrics
import org.apache.hadoop.hbase.io.hfile.BlockType.BlockCategory; //导入方法依赖的package包/类
private SchemaMetrics(final String tableName, final String cfName) {
String metricPrefix = SchemaMetrics.generateSchemaMetricsPrefix(
tableName, cfName);
for (BlockCategory blockCategory : BlockCategory.values()) {
for (boolean isCompaction : BOOL_VALUES) {
// initialize the cache metrics
onHitCacheMetrics.set(getCacheHitMetricIndex(blockCategory, isCompaction), 0);
for (BlockMetricType metricType : BlockMetricType.values()) {
if (!metricType.compactionAware && isCompaction) {
continue;
}
StringBuilder sb = new StringBuilder(metricPrefix);
if (blockCategory != BlockCategory.ALL_CATEGORIES
&& blockCategory != BlockCategory.META) {
String categoryStr = blockCategory.toString();
categoryStr = categoryStr.charAt(0)
+ categoryStr.substring(1).toLowerCase();
sb.append(BLOCK_TYPE_PREFIX + categoryStr + ".");
}
if (metricType.compactionAware) {
sb.append(isCompaction ? "compaction" : "fs");
}
// A special-case for meta blocks for backwards-compatibility.
if (blockCategory == BlockCategory.META) {
sb.append(META_BLOCK_CATEGORY_STR);
}
sb.append(metricType);
int i = getBlockMetricIndex(blockCategory, isCompaction, metricType);
blockMetricNames[i] = sb.toString();
blockMetricTimeVarying[i] = metricType.timeVarying;
}
}
}
for (boolean isInBloom : BOOL_VALUES) {
bloomMetricNames[isInBloom ? 1 : 0] = metricPrefix
+ (isInBloom ? "keyMaybeInBloomCnt" : "keyNotInBloomCnt");
}
for (StoreMetricType storeMetric : StoreMetricType.values()) {
String coreName = metricPrefix + storeMetric.toString();
storeMetricNames[storeMetric.ordinal()] = coreName;
storeMetricNamesMax[storeMetric.ordinal()] = coreName + ".max";
}
}
示例4: SchemaMetrics
import org.apache.hadoop.hbase.io.hfile.BlockType.BlockCategory; //导入方法依赖的package包/类
private SchemaMetrics(final String tableName, final String cfName) {
String metricPrefix = SchemaMetrics.generateSchemaMetricsPrefix(
tableName, cfName);
for (BlockCategory blockCategory : BlockCategory.values()) {
for (boolean isCompaction : BOOL_VALUES) {
// initialize the cache metrics
onHitCacheMetrics.set(getCacheHitMetricIndex(blockCategory, isCompaction), 0);
for (BlockMetricType metricType : BlockMetricType.values()) {
if (!metricType.compactionAware && isCompaction) {
continue;
}
StringBuilder sb = new StringBuilder(metricPrefix);
if (blockCategory != BlockCategory.ALL_CATEGORIES
&& blockCategory != BlockCategory.META) {
String categoryStr = blockCategory.toString();
categoryStr = categoryStr.charAt(0)
+ categoryStr.substring(1).toLowerCase();
sb.append(BLOCK_TYPE_PREFIX + categoryStr + ".");
}
if (metricType.compactionAware) {
sb.append(isCompaction ? "compaction" : "fs");
}
// A special-case for meta blocks for backwards-compatibility.
if (blockCategory == BlockCategory.META) {
sb.append(META_BLOCK_CATEGORY_STR);
}
sb.append(metricType);
int i = getBlockMetricIndex(blockCategory, isCompaction, metricType);
blockMetricNames[i] = sb.toString().intern();
blockMetricTimeVarying[i] = metricType.timeVarying;
}
}
}
for (boolean isInBloom : BOOL_VALUES) {
bloomMetricNames[isInBloom ? 1 : 0] = metricPrefix
+ (isInBloom ? "keyMaybeInBloomCnt" : "keyNotInBloomCnt");
}
for (StoreMetricType storeMetric : StoreMetricType.values()) {
String coreName = metricPrefix + storeMetric.toString();
storeMetricNames[storeMetric.ordinal()] = coreName;
storeMetricNamesMax[storeMetric.ordinal()] = coreName + ".max";
}
}