public class TestWALProcedureStore extends Object
Modifier and Type | Class and Description |
---|---|
static class |
TestWALProcedureStore.TestSequentialProcedure |
Modifier and Type | Field and Description |
---|---|
static HBaseClassTestRule |
CLASS_RULE |
private org.apache.hadoop.fs.FileSystem |
fs |
private HBaseCommonTestingUtility |
htu |
private static org.slf4j.Logger |
LOG |
private org.apache.hadoop.fs.Path |
logDir |
private static int |
PROCEDURE_STORE_SLOTS |
private org.apache.hadoop.hbase.procedure2.store.wal.WALProcedureStore |
procStore |
private org.apache.hadoop.fs.Path |
testDir |
Constructor and Description |
---|
TestWALProcedureStore() |
Modifier and Type | Method and Description |
---|---|
private static void |
assertDeleted(org.apache.hadoop.hbase.procedure2.store.wal.ProcedureStoreTracker tracker,
org.apache.hadoop.hbase.procedure2.Procedure<?>[] procs,
int[] deletedProcs,
int[] nonDeletedProcs) |
private static void |
assertUpdated(org.apache.hadoop.hbase.procedure2.store.wal.ProcedureStoreTracker tracker,
org.apache.hadoop.hbase.procedure2.Procedure<?>[] procs,
int[] updatedProcs,
int[] nonUpdatedProcs) |
private void |
corruptLog(org.apache.hadoop.fs.FileStatus logFile,
long dropBytes) |
private org.apache.hadoop.hbase.procedure2.store.wal.WALProcedureStore |
createWALProcedureStore(org.apache.hadoop.conf.Configuration conf) |
private ProcedureTestingUtility.LoadCounter |
restartAndAssert(long maxProcId,
long runnableCount,
int completedCount,
int corruptedCount) |
void |
setUp() |
private void |
setupConfig(org.apache.hadoop.conf.Configuration conf) |
private void |
storeRestart(org.apache.hadoop.hbase.procedure2.store.ProcedureStore.ProcedureLoader loader) |
void |
tearDown() |
void |
testBatchDelete() |
void |
testBatchInsert() |
void |
testCorruptedEntries() |
void |
testCorruptedProcedures() |
void |
testCorruptedTrailer() |
void |
testCorruptedTrailersRebuild() |
void |
testEmptyLogLoad() |
void |
testEmptyRoll() |
void |
testFileNotFoundDuringLeaseRecovery() |
void |
testLoad() |
void |
testLoadChildren() |
void |
testLogFileAlreadyExists() |
void |
testNoTrailerDoubleRestart() |
void |
testProcIdHoles() |
void |
testRestartWithoutData() |
void |
testRollAndRemove() |
void |
testWalCleanerNoHoles() |
void |
testWalCleanerSequentialClean() |
void |
testWalCleanerUpdates() |
void |
testWalCleanerUpdatesDontLeaveHoles() |
void |
testWalCleanerWithEmptyRolls() |
void |
testWALDirAndWALArchiveDir() |
void |
trackersLoadedForAllOldLogs()
Tests that tracker for all old logs are loaded back after procedure store is restarted.
|
private void |
verifyProcIdsOnRestart(Set<Long> procIds) |
public static final HBaseClassTestRule CLASS_RULE
private static final org.slf4j.Logger LOG
private static final int PROCEDURE_STORE_SLOTS
private org.apache.hadoop.hbase.procedure2.store.wal.WALProcedureStore procStore
private HBaseCommonTestingUtility htu
private org.apache.hadoop.fs.FileSystem fs
private org.apache.hadoop.fs.Path testDir
private org.apache.hadoop.fs.Path logDir
public TestWALProcedureStore()
private void setupConfig(org.apache.hadoop.conf.Configuration conf)
public void setUp() throws IOException
IOException
public void tearDown() throws IOException
IOException
private void storeRestart(org.apache.hadoop.hbase.procedure2.store.ProcedureStore.ProcedureLoader loader) throws Exception
Exception
public void testEmptyRoll() throws Exception
Exception
public void testRestartWithoutData() throws Exception
Exception
public void trackersLoadedForAllOldLogs() throws Exception
Exception
public void testWalCleanerSequentialClean() throws Exception
Exception
public void testWalCleanerNoHoles() throws Exception
Exception
public void testWalCleanerUpdates() throws Exception
Exception
public void testWalCleanerUpdatesDontLeaveHoles() throws Exception
Exception
public void testWalCleanerWithEmptyRolls() throws Exception
Exception
public void testEmptyLogLoad() throws Exception
Exception
public void testNoTrailerDoubleRestart() throws Exception
Exception
public void testProcIdHoles() throws Exception
Exception
public void testCorruptedTrailer() throws Exception
Exception
private static void assertUpdated(org.apache.hadoop.hbase.procedure2.store.wal.ProcedureStoreTracker tracker, org.apache.hadoop.hbase.procedure2.Procedure<?>[] procs, int[] updatedProcs, int[] nonUpdatedProcs)
private static void assertDeleted(org.apache.hadoop.hbase.procedure2.store.wal.ProcedureStoreTracker tracker, org.apache.hadoop.hbase.procedure2.Procedure<?>[] procs, int[] deletedProcs, int[] nonDeletedProcs)
public void testCorruptedTrailersRebuild() throws Exception
Exception
public void testCorruptedEntries() throws Exception
Exception
public void testCorruptedProcedures() throws Exception
Exception
public void testRollAndRemove() throws IOException
IOException
public void testFileNotFoundDuringLeaseRecovery() throws IOException
IOException
public void testLogFileAlreadyExists() throws IOException
IOException
public void testLoadChildren() throws Exception
Exception
public void testBatchDelete() throws Exception
Exception
public void testBatchInsert() throws Exception
Exception
public void testWALDirAndWALArchiveDir() throws IOException
IOException
private org.apache.hadoop.hbase.procedure2.store.wal.WALProcedureStore createWALProcedureStore(org.apache.hadoop.conf.Configuration conf) throws IOException
IOException
private ProcedureTestingUtility.LoadCounter restartAndAssert(long maxProcId, long runnableCount, int completedCount, int corruptedCount) throws Exception
Exception
private void corruptLog(org.apache.hadoop.fs.FileStatus logFile, long dropBytes) throws IOException
IOException
private void verifyProcIdsOnRestart(Set<Long> procIds) throws Exception
Exception
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.