HBASE-1608 TestCachedBlockQueue failing on some jvms
git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@790764 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
ad8968141d
commit
98e1225354
|
@ -241,6 +241,7 @@ Release 0.20.0 - Unreleased
|
|||
HBASE-1594 Fix scan addcolumns after hbase-1385 commit (broken hudson build)
|
||||
HBASE-1595 hadoop-default.xml and zoo.cfg in hbase jar
|
||||
HBASE-1602 HRegionServer won't go down since we added in new LruBlockCache
|
||||
HBASE-1608 TestCachedBlockQueue failing on some jvms (Jon Gray via Stack)
|
||||
|
||||
IMPROVEMENTS
|
||||
HBASE-1089 Add count of regions on filesystem to master UI; add percentage
|
||||
|
|
|
@ -23,7 +23,7 @@ import java.nio.ByteBuffer;
|
|||
import junit.framework.TestCase;
|
||||
|
||||
public class TestCachedBlockQueue extends TestCase {
|
||||
|
||||
|
||||
public void testQueue() throws Exception {
|
||||
|
||||
CachedBlock cb1 = new CachedBlock(1000, "cb1", 1);
|
||||
|
@ -95,7 +95,7 @@ public class TestCachedBlockQueue extends TestCase {
|
|||
queue.add(cb9);
|
||||
queue.add(cb10);
|
||||
|
||||
CachedBlock cb0 = new CachedBlock(10, "cb0", 0);
|
||||
CachedBlock cb0 = new CachedBlock(10 + CachedBlock.PER_BLOCK_OVERHEAD, "cb0", 0);
|
||||
queue.add(cb0);
|
||||
|
||||
// This is older so we must include it, but it will not end up kicking
|
||||
|
@ -125,7 +125,9 @@ public class TestCachedBlockQueue extends TestCase {
|
|||
private class CachedBlock extends org.apache.hadoop.hbase.io.hfile.CachedBlock
|
||||
{
|
||||
public CachedBlock(long heapSize, String name, long accessTime) {
|
||||
super(name,ByteBuffer.allocate((int)heapSize),accessTime,false);
|
||||
super(name,
|
||||
ByteBuffer.allocate((int)(heapSize - CachedBlock.PER_BLOCK_OVERHEAD)),
|
||||
accessTime,false);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue