Class TestWALObserver
java.lang.Object
org.apache.hadoop.hbase.coprocessor.TestWALObserver
Tests invocation of the 
MasterObserver interface
 hooks at all appropriate times during normal HMaster operations.- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final HBaseClassTestRuleprivate org.apache.hadoop.conf.Configurationorg.junit.rules.TestNameprivate org.apache.hadoop.fs.FileSystemprivate org.apache.hadoop.fs.Pathprivate org.apache.hadoop.fs.Pathprivate static final org.slf4j.Loggerprivate org.apache.hadoop.fs.Pathprivate org.apache.hadoop.fs.Pathprivate static byte[][]private static byte[][]private static byte[]private static byte[]private static final HBaseTestingUtilityprivate static byte[][]private org.apache.hadoop.hbase.wal.WALFactory
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprivate voidaddWALEdits(org.apache.hadoop.hbase.TableName tableName, org.apache.hadoop.hbase.client.RegionInfo hri, byte[] rowName, byte[] family, int count, org.apache.hadoop.hbase.util.EnvironmentEdge ee, org.apache.hadoop.hbase.wal.WAL wal, NavigableMap<byte[], Integer> scopes, org.apache.hadoop.hbase.regionserver.MultiVersionConcurrencyControl mvcc) private org.apache.hadoop.hbase.client.TableDescriptorcreateBasic3FamilyHTD(String tableName) private org.apache.hadoop.hbase.client.RegionInfocreateBasicHRegionInfo(String tableName) Creates an HRI around an HTD that hastableName.private org.apache.hadoop.hbase.client.PutcreatPutWith2Families(byte[] row) private voiddeleteDir(org.apache.hadoop.fs.Path p) private org.apache.hadoop.hbase.client.TableDescriptorgetBasic3FamilyHTableDescriptor(org.apache.hadoop.hbase.TableName tableName) private SampleRegionWALCoprocessorgetCoprocessor(org.apache.hadoop.hbase.wal.WAL wal, Class<? extends SampleRegionWALCoprocessor> clazz) private org.apache.hadoop.fs.PathrunWALSplit(org.apache.hadoop.conf.Configuration c) voidsetUp()static voidvoidtearDown()static voidvoidCoprocessors shouldn't get notice of empty waledits.voidTest WAL replay behavior with WALObserver.voidTest to see CP loaded successfully or not.voidvoidTest WAL write behavior with WALObserver.private voidverifyWritesSeen(org.apache.hadoop.hbase.wal.WAL log, SampleRegionWALCoprocessor cp, boolean seesLegacy) 
- 
Field Details- 
CLASS_RULE
- 
LOG
- 
TEST_UTIL
- 
TEST_TABLE
- 
TEST_FAMILY
- 
TEST_QUALIFIER
- 
TEST_VALUE
- 
TEST_ROW
- 
currentTest
- 
conf
- 
fs
- 
hbaseRootDir
- 
hbaseWALRootDir
- 
oldLogDir
- 
logDir
- 
wals
 
- 
- 
Constructor Details- 
TestWALObserverpublic TestWALObserver()
 
- 
- 
Method Details- 
setupBeforeClass- Throws:
- Exception
 
- 
teardownAfterClass- Throws:
- Exception
 
- 
setUp- Throws:
- Exception
 
- 
tearDown- Throws:
- Exception
 
- 
testWALObserverWriteToWALTest WAL write behavior with WALObserver. The coprocessor monitors a WALEdit written to WAL, and ignore, modify, and add KeyValue's for the WALEdit.- Throws:
- Exception
 
- 
verifyWritesSeenprivate void verifyWritesSeen(org.apache.hadoop.hbase.wal.WAL log, SampleRegionWALCoprocessor cp, boolean seesLegacy) throws Exception - Throws:
- Exception
 
- 
testEmptyWALEditAreNotSeenCoprocessors shouldn't get notice of empty waledits.- Throws:
- Exception
 
- 
testWALCoprocessorReplayTest WAL replay behavior with WALObserver.- Throws:
- Exception
 
- 
testWALObserverLoadedTest to see CP loaded successfully or not. There is a duplication at TestHLog, but the purpose of that one is to see whether the loaded CP will impact existing WAL tests or not.- Throws:
- Exception
 
- 
testWALObserverRoll- Throws:
- Exception
 
- 
getCoprocessorprivate SampleRegionWALCoprocessor getCoprocessor(org.apache.hadoop.hbase.wal.WAL wal, Class<? extends SampleRegionWALCoprocessor> clazz) throws Exception - Throws:
- Exception
 
- 
createBasicHRegionInfoCreates an HRI around an HTD that hastableName.- Parameters:
- tableName- Name of table to use.
 
- 
deleteDir- Throws:
- IOException
 
- 
creatPutWith2Families- Throws:
- IOException
 
- 
runWALSplitprivate org.apache.hadoop.fs.Path runWALSplit(org.apache.hadoop.conf.Configuration c) throws IOException - Throws:
- IOException
 
- 
getBasic3FamilyHTableDescriptorprivate org.apache.hadoop.hbase.client.TableDescriptor getBasic3FamilyHTableDescriptor(org.apache.hadoop.hbase.TableName tableName) 
- 
createBasic3FamilyHTD
 
-