Repository: hbase
Updated Branches:
  refs/heads/master f282ade9a -> f93e4d47d


HBASE-11770 TestBlockCacheReporting.testBucketCache is not stable (Sergey 
Soldatov)


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/f93e4d47
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/f93e4d47
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/f93e4d47

Branch: refs/heads/master
Commit: f93e4d47d939d852b88717476447671cb90311e5
Parents: f282ade
Author: stack <[email protected]>
Authored: Mon Aug 18 15:34:15 2014 -0700
Committer: stack <[email protected]>
Committed: Mon Aug 18 15:34:27 2014 -0700

----------------------------------------------------------------------
 .../org/apache/hadoop/hbase/io/hfile/TestCacheConfig.java   | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/f93e4d47/hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/TestCacheConfig.java
----------------------------------------------------------------------
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/TestCacheConfig.java
 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/TestCacheConfig.java
index e6a476c..343caad 100644
--- 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/TestCacheConfig.java
+++ 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/TestCacheConfig.java
@@ -57,14 +57,16 @@ public class TestCacheConfig {
 
   static class Deserializer implements CacheableDeserializer<Cacheable> {
     private final Cacheable cacheable;
- 
+    private int deserializedIdentifier = 0;
+
     Deserializer(final Cacheable c) {
+      deserializedIdentifier = 
CacheableDeserializerIdManager.registerDeserializer(this);
       this.cacheable = c;
     }
 
     @Override
     public int getDeserialiserIdentifier() {
-      return 0;
+      return deserializedIdentifier;
     }
 
     @Override
@@ -106,10 +108,11 @@ public class TestCacheConfig {
       this.deserializer = new Deserializer(c);
     }
 
+    @Override
     public String toString() {
       return "size=" + SIZE + ", type=" + getBlockType();
     };
- 
+
     @Override
     public long heapSize() {
       return SIZE;

Reply via email to