Repository: hbase Updated Branches: refs/heads/branch-1 fb40c3834 -> ac6b74737
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/ac6b7473 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/ac6b7473 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/ac6b7473 Branch: refs/heads/branch-1 Commit: ac6b747370a5cecceea125a03440858c99eba9ea Parents: fb40c38 Author: stack <[email protected]> Authored: Mon Aug 18 15:34:15 2014 -0700 Committer: stack <[email protected]> Committed: Mon Aug 18 15:35:23 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/ac6b7473/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;
