HBASE-11770 TestBlockCacheReporting.testBucketCache is not stable (Sergey Soldatov)
This commit is contained in:
parent
f282ade9a7
commit
f93e4d47d9
@ -57,14 +57,16 @@ public class TestCacheConfig {
|
|||||||
|
|
||||||
static class Deserializer implements CacheableDeserializer<Cacheable> {
|
static class Deserializer implements CacheableDeserializer<Cacheable> {
|
||||||
private final Cacheable cacheable;
|
private final Cacheable cacheable;
|
||||||
|
private int deserializedIdentifier = 0;
|
||||||
|
|
||||||
Deserializer(final Cacheable c) {
|
Deserializer(final Cacheable c) {
|
||||||
|
deserializedIdentifier = CacheableDeserializerIdManager.registerDeserializer(this);
|
||||||
this.cacheable = c;
|
this.cacheable = c;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getDeserialiserIdentifier() {
|
public int getDeserialiserIdentifier() {
|
||||||
return 0;
|
return deserializedIdentifier;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -106,10 +108,11 @@ public class TestCacheConfig {
|
|||||||
this.deserializer = new Deserializer(c);
|
this.deserializer = new Deserializer(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "size=" + SIZE + ", type=" + getBlockType();
|
return "size=" + SIZE + ", type=" + getBlockType();
|
||||||
};
|
};
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public long heapSize() {
|
public long heapSize() {
|
||||||
return SIZE;
|
return SIZE;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user