public class TestBucketWriterThread extends Object
Modifier and Type | Class and Description |
---|---|
private static class |
TestBucketWriterThread.MockBucketCache
A BucketCache that does not start its writer threads.
|
Modifier and Type | Field and Description |
---|---|
private org.apache.hadoop.hbase.io.hfile.bucket.BucketCache |
bc |
static HBaseClassTestRule |
CLASS_RULE |
private org.apache.hadoop.hbase.io.hfile.Cacheable |
plainCacheable |
private org.apache.hadoop.hbase.io.hfile.BlockCacheKey |
plainKey |
private BlockingQueue<org.apache.hadoop.hbase.io.hfile.bucket.BucketCache.RAMQueueEntry> |
q |
private org.apache.hadoop.hbase.io.hfile.bucket.BucketCache.WriterThread |
wt |
Constructor and Description |
---|
TestBucketWriterThread() |
Modifier and Type | Method and Description |
---|---|
private static void |
doDrainOfOneEntry(org.apache.hadoop.hbase.io.hfile.bucket.BucketCache bc,
org.apache.hadoop.hbase.io.hfile.bucket.BucketCache.WriterThread wt,
BlockingQueue<org.apache.hadoop.hbase.io.hfile.bucket.BucketCache.RAMQueueEntry> q) |
void |
setUp()
Set up variables and get BucketCache and WriterThread into state where tests can manually
control the running of WriterThread and BucketCache is empty.
|
void |
tearDown() |
void |
testCacheFullException()
Do Cache full exception
|
void |
testIOE()
Do IOE.
|
void |
testNonErrorCase()
Test non-error case just works.
|
void |
testTooBigEntry()
Pass through a too big entry and ensure it is cleared from queues and ramCache.
|
public static final HBaseClassTestRule CLASS_RULE
private org.apache.hadoop.hbase.io.hfile.bucket.BucketCache bc
private org.apache.hadoop.hbase.io.hfile.bucket.BucketCache.WriterThread wt
private BlockingQueue<org.apache.hadoop.hbase.io.hfile.bucket.BucketCache.RAMQueueEntry> q
private org.apache.hadoop.hbase.io.hfile.Cacheable plainCacheable
private org.apache.hadoop.hbase.io.hfile.BlockCacheKey plainKey
public TestBucketWriterThread()
public void setUp() throws Exception
Exception
public void testNonErrorCase() throws IOException, InterruptedException
public void testTooBigEntry() throws InterruptedException
InterruptedException
public void testIOE() throws IOException, InterruptedException
IOException
InterruptedException
public void testCacheFullException() throws IOException, InterruptedException
IOException
InterruptedException
private static void doDrainOfOneEntry(org.apache.hadoop.hbase.io.hfile.bucket.BucketCache bc, org.apache.hadoop.hbase.io.hfile.bucket.BucketCache.WriterThread wt, BlockingQueue<org.apache.hadoop.hbase.io.hfile.bucket.BucketCache.RAMQueueEntry> q) throws InterruptedException
InterruptedException
Copyright © 2007–2021 The Apache Software Foundation. All rights reserved.