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

This commit is contained in:
stack 2014-08-18 15:34:15 -07:00
parent f282ade9a7
commit f93e4d47d9
1 changed files with 6 additions and 3 deletions

View File

@ -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,6 +108,7 @@ public class TestCacheConfig {
this.deserializer = new Deserializer(c);
}
@Override
public String toString() {
return "size=" + SIZE + ", type=" + getBlockType();
};