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 2016/08/17 17:59:07 UTC
[1/2] hbase git commit: HBASE-16422 Tighten our guarantees on
compatibility across patch versions
Repository: hbase
Updated Branches:
refs/heads/master 233ca65b8 -> fb4ef5357
HBASE-16422 Tighten our guarantees on compatibility across patch versions
Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/2261c8c3
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/2261c8c3
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/2261c8c3
Branch: refs/heads/master
Commit: 2261c8c31a46fc79d9b930db90752ab60945b74a
Parents: 233ca65
Author: stack <st...@apache.org>
Authored: Tue Aug 16 04:36:11 2016 -0700
Committer: stack <st...@apache.org>
Committed: Wed Aug 17 10:58:26 2016 -0700
----------------------------------------------------------------------
src/main/asciidoc/_chapters/upgrading.adoc | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hbase/blob/2261c8c3/src/main/asciidoc/_chapters/upgrading.adoc
----------------------------------------------------------------------
diff --git a/src/main/asciidoc/_chapters/upgrading.adoc b/src/main/asciidoc/_chapters/upgrading.adoc
index d731542..9552024 100644
--- a/src/main/asciidoc/_chapters/upgrading.adoc
+++ b/src/main/asciidoc/_chapters/upgrading.adoc
@@ -71,9 +71,10 @@ In addition to the usual API versioning considerations HBase has other compatibi
.Client API compatibility
* Allow changing or removing existing client APIs.
-* An API needs to deprecated for a major version before we will change/remove it.
+* An API needs to be deprecated for a major version before we will change/remove it.
* APIs available in a patch version will be available in all later patch versions. However, new APIs may be added which will not be available in earlier patch versions.
-* Example: A user using a newly deprecated api does not need to modify application code with hbase api calls until the next major version.
+* New APIs introduced in a patch version will only be added in a source compatible way footnote:[See 'Source Compatibility' https://blogs.oracle.com/darcy/entry/kinds_of_compatibility]: i.e. code that implements public APIs will continue to compile.
+* Example: A user using a newly deprecated API does not need to modify application code with HBase API calls until the next major version.
.Client Binary compatibility
* Client code written to APIs available in a given patch release can run unchanged (no recompilation needed) against the new jars of later patch versions.
@@ -95,7 +96,7 @@ In addition to the usual API versioning considerations HBase has other compatibi
* JMX APIs exposed via the `/jmx/` endpoint
.Summary
-* A patch upgrade is a drop-in replacement. Any change that is not Java binary compatible would not be allowed.footnote:[See http://docs.oracle.com/javase/specs/jls/se7/html/jls-13.html.]. Downgrading versions within patch releases may not be compatible.
+* A patch upgrade is a drop-in replacement. Any change that is not Java binary and source compatible would not be allowed.footnote:[See http://docs.oracle.com/javase/specs/jls/se7/html/jls-13.html.] Downgrading versions within patch releases may not be compatible.
* A minor upgrade requires no application/client code modification. Ideally it would be a drop-in replacement but client code, coprocessors, filters, etc might have to be recompiled if new jars are used.
[2/2] hbase git commit: HBASE-15635 Mean age of Blocks in cache
(seconds) on webUI should be greater than zero
Posted by st...@apache.org.
HBASE-15635 Mean age of Blocks in cache (seconds) on webUI should be greater than zero
Signed-off-by: stack <st...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/fb4ef535
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/fb4ef535
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/fb4ef535
Branch: refs/heads/master
Commit: fb4ef5357115c708b0857bdce0a0c2f4d38fdd10
Parents: 2261c8c
Author: chenheng <ch...@apache.org>
Authored: Wed Aug 17 11:06:34 2016 +0800
Committer: stack <st...@apache.org>
Committed: Wed Aug 17 10:59:00 2016 -0700
----------------------------------------------------------------------
.../apache/hadoop/hbase/tmpl/regionserver/BlockCacheTmpl.jamon | 6 +-----
.../java/org/apache/hadoop/hbase/io/hfile/BlockCacheUtil.java | 6 +++++-
.../main/java/org/apache/hadoop/hbase/io/hfile/CacheStats.java | 4 +++-
3 files changed, 9 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hbase/blob/fb4ef535/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/regionserver/BlockCacheTmpl.jamon
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/regionserver/BlockCacheTmpl.jamon b/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/regionserver/BlockCacheTmpl.jamon
index 49a1e1b..daa5d76 100644
--- a/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/regionserver/BlockCacheTmpl.jamon
+++ b/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/regionserver/BlockCacheTmpl.jamon
@@ -177,7 +177,6 @@ org.apache.hadoop.util.StringUtils.TraditionalBinaryPrefix;
<%java>
AgeSnapshot ageAtEvictionSnapshot = bc.getStats().getAgeAtEvictionSnapshot();
// Only show if non-zero mean and stddev as is the case in combinedblockcache
- double mean = ageAtEvictionSnapshot.getMean();
</%java>
<tr>
<td>Evicted</td>
@@ -189,13 +188,11 @@ org.apache.hadoop.util.StringUtils.TraditionalBinaryPrefix;
<td><% String.format("%,d", bc.getStats().getEvictionCount()) %></td>
<td>The total number of times an eviction has occurred</td>
</tr>
-<%if mean > 0 %>
<tr>
<td>Mean</td>
- <td><% String.format("%,d", (long)(ageAtEvictionSnapshot.getMean()/(1000000 * 1000))) %></td>
+ <td><% String.format("%,d", (long)ageAtEvictionSnapshot.getMean()) %></td>
<td>Mean age of Blocks at eviction time (seconds)</td>
</tr>
-</%if>
</%def>
<%def hits_tmpl>
@@ -288,7 +285,6 @@ are combined counts. Request count is sum of hits and misses.</p>
boolean evictions;
</%args>
<%java>
- final long nanosPerSecond = 1000000000;
String bcUrl = "http://hbase.apache.org/devapidocs/" + bc.getClass().getName().replaceAll("\\.", "/") + ".html";
String bcName = bc.getClass().getSimpleName();
org.apache.hadoop.hbase.io.hfile.BlockCacheUtil.CachedBlocksByFile cbsbf =
http://git-wip-us.apache.org/repos/asf/hbase/blob/fb4ef535/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/BlockCacheUtil.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/BlockCacheUtil.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/BlockCacheUtil.java
index e31c340..3c11149 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/BlockCacheUtil.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/BlockCacheUtil.java
@@ -39,6 +39,10 @@ import org.codehaus.jackson.map.SerializationConfig;
*/
@InterfaceAudience.Private
public class BlockCacheUtil {
+
+
+ public static final long NANOS_PER_SECOND = 1000000000;
+
/**
* Needed generating JSON.
*/
@@ -224,7 +228,7 @@ public class BlockCacheUtil {
this.dataBlockCount++;
this.dataSize += cb.getSize();
}
- long age = this.now - cb.getCachedTime();
+ long age = (this.now - cb.getCachedTime())/NANOS_PER_SECOND;
this.hist.add(age, 1);
return false;
}
http://git-wip-us.apache.org/repos/asf/hbase/blob/fb4ef535/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/CacheStats.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/CacheStats.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/CacheStats.java
index 8de2a03..04f6a1e 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/CacheStats.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/CacheStats.java
@@ -248,7 +248,9 @@ public class CacheStats {
}
public void evicted(final long t, boolean primary) {
- if (t > this.startTime) this.ageAtEviction.add(t - this.startTime,1);
+ if (t > this.startTime) {
+ this.ageAtEviction.add((t - this.startTime) / BlockCacheUtil.NANOS_PER_SECOND, 1);
+ }
this.evictedBlockCount.increment();
if (primary) {
primaryEvictedBlockCount.increment();