You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by st...@apache.org on 2014/05/22 20:42:41 UTC
git commit: HBASE-11229 Change block cache percentage metrics to be
doubles rather than ints
Repository: hbase
Updated Branches:
refs/heads/master 98de4b04f -> 46e53b089
HBASE-11229 Change block cache percentage metrics to be doubles rather than ints
In HBASE-8370 "Report data block cache hit rates apart from aggregate cache hit rates"
discussion highlights small changes in caching percentage can make for large
changes in cache contents; e.g. lots of data blocks may be getting evicited
but because meta blocks -- index and blooms -- are staying in cache with
high hit rates, a large data block eviction may show as a small change in
overall cache percentage (e.g. from 99.99 to 99.11).
Changes the getBlockCacheHitPercent from an int to a double.
Also changes name of the jmx metric blockCountHitPercent to be
blockCacheCountHitPercent instead.
May be incompatible change.
Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/46e53b08
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/46e53b08
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/46e53b08
Branch: refs/heads/master
Commit: 46e53b089a81c2e1606b1616b1abf64277de50a9
Parents: 98de4b0
Author: Michael Stack <st...@duboce.net>
Authored: Thu May 22 11:37:50 2014 -0700
Committer: Michael Stack <st...@duboce.net>
Committed: Thu May 22 11:37:50 2014 -0700
----------------------------------------------------------------------
.../regionserver/MetricsRegionServerSource.java | 2 +-
.../MetricsRegionServerWrapper.java | 2 +-
.../MetricsRegionServerWrapperImpl.java | 2 +-
.../apache/hadoop/hbase/io/hfile/package.html | 25 --------------------
.../MetricsRegionServerWrapperStub.java | 2 +-
5 files changed, 4 insertions(+), 29 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hbase/blob/46e53b08/hbase-hadoop-compat/src/main/java/org/apache/hadoop/hbase/regionserver/MetricsRegionServerSource.java
----------------------------------------------------------------------
diff --git a/hbase-hadoop-compat/src/main/java/org/apache/hadoop/hbase/regionserver/MetricsRegionServerSource.java b/hbase-hadoop-compat/src/main/java/org/apache/hadoop/hbase/regionserver/MetricsRegionServerSource.java
index ac5fb51..cbe5854 100644
--- a/hbase-hadoop-compat/src/main/java/org/apache/hadoop/hbase/regionserver/MetricsRegionServerSource.java
+++ b/hbase-hadoop-compat/src/main/java/org/apache/hadoop/hbase/regionserver/MetricsRegionServerSource.java
@@ -179,7 +179,7 @@ public interface MetricsRegionServerSource extends BaseSource {
String BLOCK_CACHE_EVICTION_COUNT = "blockCacheEvictionCount";
String BLOCK_CACHE_EVICTION_COUNT_DESC =
"Count of the number of blocks evicted from the block cache.";
- String BLOCK_CACHE_HIT_PERCENT = "blockCountHitPercent";
+ String BLOCK_CACHE_HIT_PERCENT = "blockCacheCountHitPercent";
String BLOCK_CACHE_HIT_PERCENT_DESC =
"Percent of block cache requests that are hits";
String BLOCK_CACHE_EXPRESS_HIT_PERCENT = "blockCacheExpressHitPercent";
http://git-wip-us.apache.org/repos/asf/hbase/blob/46e53b08/hbase-hadoop-compat/src/main/java/org/apache/hadoop/hbase/regionserver/MetricsRegionServerWrapper.java
----------------------------------------------------------------------
diff --git a/hbase-hadoop-compat/src/main/java/org/apache/hadoop/hbase/regionserver/MetricsRegionServerWrapper.java b/hbase-hadoop-compat/src/main/java/org/apache/hadoop/hbase/regionserver/MetricsRegionServerWrapper.java
index 83b6da1..057c48d 100644
--- a/hbase-hadoop-compat/src/main/java/org/apache/hadoop/hbase/regionserver/MetricsRegionServerWrapper.java
+++ b/hbase-hadoop-compat/src/main/java/org/apache/hadoop/hbase/regionserver/MetricsRegionServerWrapper.java
@@ -200,7 +200,7 @@ public interface MetricsRegionServerWrapper {
/**
* Get the percent of all requests that hit the block cache.
*/
- int getBlockCacheHitPercent();
+ double getBlockCacheHitPercent();
/**
* Get the percent of requests with the block cache turned on that hit the block cache.
http://git-wip-us.apache.org/repos/asf/hbase/blob/46e53b08/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/MetricsRegionServerWrapperImpl.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/MetricsRegionServerWrapperImpl.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/MetricsRegionServerWrapperImpl.java
index 55a5d80..ef6bc8c 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/MetricsRegionServerWrapperImpl.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/MetricsRegionServerWrapperImpl.java
@@ -242,7 +242,7 @@ class MetricsRegionServerWrapperImpl
}
@Override
- public int getBlockCacheHitPercent() {
+ public double getBlockCacheHitPercent() {
if (this.cacheStats == null) {
return 0;
}
http://git-wip-us.apache.org/repos/asf/hbase/blob/46e53b08/hbase-server/src/main/javadoc/org/apache/hadoop/hbase/io/hfile/package.html
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/javadoc/org/apache/hadoop/hbase/io/hfile/package.html b/hbase-server/src/main/javadoc/org/apache/hadoop/hbase/io/hfile/package.html
deleted file mode 100644
index fa9244f..0000000
--- a/hbase-server/src/main/javadoc/org/apache/hadoop/hbase/io/hfile/package.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<html>
-
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<head />
-<body bgcolor="white">
-Provides the hbase data+index+metadata file.
-</body>
-</html>
http://git-wip-us.apache.org/repos/asf/hbase/blob/46e53b08/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/MetricsRegionServerWrapperStub.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/MetricsRegionServerWrapperStub.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/MetricsRegionServerWrapperStub.java
index 31686f5..875fe35 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/MetricsRegionServerWrapperStub.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/MetricsRegionServerWrapperStub.java
@@ -181,7 +181,7 @@ public class MetricsRegionServerWrapperStub implements MetricsRegionServerWrappe
}
@Override
- public int getBlockCacheHitPercent() {
+ public double getBlockCacheHitPercent() {
return 98;
}