Package org.apache.hadoop.hbase.wal
Class TestFSHLogProvider
java.lang.Object
org.apache.hadoop.hbase.wal.TestFSHLogProvider
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final HBaseClassTestRuleprivate static org.apache.hadoop.conf.Configurationfinal org.junit.rules.TestNameprivate static org.apache.hadoop.fs.FileSystemprivate static final org.slf4j.Loggerprivate org.apache.hadoop.hbase.regionserver.MultiVersionConcurrencyControlprivate static final HBaseTestingUtil
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprivate voidaddEdits(org.apache.hadoop.hbase.wal.WAL log, org.apache.hadoop.hbase.client.RegionInfo hri, org.apache.hadoop.hbase.client.TableDescriptor htd, int times, NavigableMap<byte[], Integer> scopes) private voidflushRegion(org.apache.hadoop.hbase.wal.WAL wal, byte[] regionEncodedName, Set<byte[]> flushedFamilyNames) helper method to simulate region flush for a WAL.private org.apache.hadoop.hbase.wal.WALKeyImplgetWalKey(byte[] info, org.apache.hadoop.hbase.TableName tableName, long timestamp, NavigableMap<byte[], Integer> scopes) used by TestDefaultWALProviderWithHLogKeyvoidEnsure that we can use Set.add to deduplicate WALsvoidsetUp()static voidstatic voidvoidvoidprivate voidtestLogCleaning(org.apache.hadoop.hbase.wal.WALFactory wals) voidTests 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).private voidtestWALArchiving(org.apache.hadoop.hbase.wal.WALFactory wals) private voidwaitNumRolledLogFiles(org.apache.hadoop.hbase.wal.WAL wal, int expected) 
- 
Field Details- 
CLASS_RULE
- 
LOG
- 
conf
- 
fs
- 
TEST_UTIL
- 
mvcc
- 
currentTest
 
- 
- 
Constructor Details- 
TestFSHLogProviderpublic TestFSHLogProvider()
 
- 
- 
Method Details- 
setUp- Throws:
- Exception
 
- 
setUpBeforeClass- Throws:
- Exception
 
- 
tearDownAfterClass- Throws:
- Exception
 
- 
testGetServerNameFromWALDirectoryName- Throws:
- IOException
 
- 
flushRegionprivate void flushRegion(org.apache.hadoop.hbase.wal.WAL wal, byte[] regionEncodedName, Set<byte[]> flushedFamilyNames) helper method to simulate region flush for a WAL.
- 
waitNumRolledLogFiles
- 
testLogCleaning- Throws:
- IOException
 
- 
testLogCleaning- Throws:
- Exception
 
- 
testWALArchiving- Throws:
- IOException
 
- 
testWALArchivingTests 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).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. - Throws:
- IOException
 
- 
setMembershipDedupsEnsure that we can use Set.add to deduplicate WALs- Throws:
- IOException
 
 
-