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

This commit is contained in:
stack 2014-08-18 15:34:15 -07:00
parent fb40c38345
commit ac6b747370
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,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;