Class TestBucketWriterThread
java.lang.Object
org.apache.hadoop.hbase.io.hfile.bucket.TestBucketWriterThread
-
Nested Class Summary
Modifier and TypeClassDescriptionprivate static class
A BucketCache that does not start its writer threads. -
Field Summary
Modifier and TypeFieldDescriptionprivate org.apache.hadoop.hbase.io.hfile.bucket.BucketCache
static final HBaseClassTestRule
private org.apache.hadoop.hbase.io.hfile.Cacheable
private org.apache.hadoop.hbase.io.hfile.BlockCacheKey
private BlockingQueue<org.apache.hadoop.hbase.io.hfile.bucket.BucketCache.RAMQueueEntry>
private org.apache.hadoop.hbase.io.hfile.bucket.BucketCache.WriterThread
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate 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
Do Cache full exceptionvoid
testIOE()
Do IOE.void
Test non-error case just works.void
Pass through a too big entry and ensure it is cleared from queues and ramCache.
-
Field Details
-
CLASS_RULE
-
bc
-
wt
-
q
-
plainCacheable
-
plainKey
-
-
Constructor Details
-
TestBucketWriterThread
public TestBucketWriterThread()
-
-
Method Details
-
setUp
Set up variables and get BucketCache and WriterThread into state where tests can manually control the running of WriterThread and BucketCache is empty.- Throws:
Exception
-
tearDown
- Throws:
Exception
-
testNonErrorCase
Test non-error case just works.- Throws:
IOException
InterruptedException
-
testTooBigEntry
Pass through a too big entry and ensure it is cleared from queues and ramCache. Manually run the WriterThread.- Throws:
InterruptedException
-
testIOE
Do IOE. Take the RAMQueueEntry that was on the queue, doctor it to throw exception, then put it back and process it.- Throws:
IOException
InterruptedException
-
testCacheFullException
Do Cache full exception- Throws:
IOException
InterruptedException
-
doDrainOfOneEntry
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 - Throws:
InterruptedException
-