public class TestFSHLogProvider extends Object
| Modifier and Type | Field and Description |
|---|---|
static HBaseClassTestRule |
CLASS_RULE |
org.junit.rules.TestName |
currentTest |
| Constructor and Description |
|---|
TestFSHLogProvider() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
flushRegion(WAL wal,
byte[] regionEncodedName,
Set<byte[]> flushedFamilyNames)
helper method to simulate region flush for a WAL.
|
void |
setMembershipDedups()
Ensure that we can use Set.add to deduplicate WALs
|
void |
setUp() |
static void |
setUpBeforeClass() |
static void |
tearDownAfterClass() |
void |
testConcurrentWrites()
Write to a log file with three concurrent threads and verifying all data is written.
|
void |
testGetServerNameFromWALDirectoryName() |
void |
testLogCleaning() |
void |
testWALArchiving()
Tests wal archiving by adding data, doing flushing/rolling and checking we archive old logs
and also don't archive "live logs" (that is, a log with un-flushed entries).
|
public static final HBaseClassTestRule CLASS_RULE
public final org.junit.rules.TestName currentTest
public TestFSHLogProvider()
public static void setUpBeforeClass() throws Exception
Exceptionpublic static void tearDownAfterClass() throws Exception
Exceptionpublic void testGetServerNameFromWALDirectoryName() throws IOException
IOExceptionprotected void flushRegion(WAL wal, byte[] regionEncodedName, Set<byte[]> flushedFamilyNames)
wal - regionEncodedName - public void testLogCleaning() throws Exception
Exceptionpublic void testWALArchiving() throws IOException
This is what it does: It creates two regions, and does a series of inserts along with log rolling. Whenever a WAL is rolled, HLogBase checks previous wals for archiving. A wal is eligible for archiving if for all the regions which have entries in that wal file, have flushed - past their maximum sequence id in that wal file.
IOExceptionpublic void testConcurrentWrites() throws Exception
Exceptionpublic void setMembershipDedups() throws IOException
IOExceptionCopyright © 2007–2019 Cloudera. All rights reserved.