HBASE-20036 TestAvoidCellReferencesIntoShippedBlocks timed out (Ram)
This commit is contained in:
parent
a29b3caf4d
commit
7cfb46432f
|
@ -400,23 +400,27 @@ public class TestAvoidCellReferencesIntoShippedBlocks {
|
||||||
scanner = table.getScanner(s1);
|
scanner = table.getScanner(s1);
|
||||||
int count = Iterables.size(scanner);
|
int count = Iterables.size(scanner);
|
||||||
assertEquals("Count the rows", 2, count);
|
assertEquals("Count the rows", 2, count);
|
||||||
iterator = cache.iterator();
|
int newBlockRefCount = 0;
|
||||||
List<BlockCacheKey> newCacheList = new ArrayList<>();
|
List<BlockCacheKey> newCacheList = new ArrayList<>();
|
||||||
|
while (true) {
|
||||||
|
newBlockRefCount = 0;
|
||||||
|
newCacheList.clear();
|
||||||
|
iterator = cache.iterator();
|
||||||
while (iterator.hasNext()) {
|
while (iterator.hasNext()) {
|
||||||
CachedBlock next = iterator.next();
|
CachedBlock next = iterator.next();
|
||||||
BlockCacheKey cacheKey = new BlockCacheKey(next.getFilename(), next.getOffset());
|
BlockCacheKey cacheKey = new BlockCacheKey(next.getFilename(), next.getOffset());
|
||||||
newCacheList.add(cacheKey);
|
newCacheList.add(cacheKey);
|
||||||
}
|
}
|
||||||
int newBlockRefCount = 0;
|
|
||||||
for (BlockCacheKey key : cacheList) {
|
for (BlockCacheKey key : cacheList) {
|
||||||
if (newCacheList.contains(key)) {
|
if (newCacheList.contains(key)) {
|
||||||
newBlockRefCount++;
|
newBlockRefCount++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (newBlockRefCount == 6) {
|
||||||
assertEquals("old blocks should still be found ", 6, newBlockRefCount);
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
latch.countDown();
|
latch.countDown();
|
||||||
|
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue