Class TestLogsCleaner
java.lang.Object
org.apache.hadoop.hbase.master.cleaner.TestLogsCleaner
-
Nested Class Summary
Modifier and TypeClassDescription(package private) static class
(package private) static class
-
Field Summary
Modifier and TypeFieldDescriptionstatic final HBaseClassTestRule
private static org.apache.hadoop.conf.Configuration
private static final org.slf4j.Logger
private static final org.apache.hadoop.fs.Path
private static final org.apache.hadoop.fs.Path
private static org.apache.hadoop.hbase.master.cleaner.DirScanPool
private static final HBaseTestingUtility
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
private void
createFiles
(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path parentDir, int numOfFiles) static void
static void
void
This tests verifies LogCleaner works correctly with WALs and Procedure WALs located in the same oldWALs directory.void
void
ReplicationLogCleaner should be able to ride over ZooKeeper errors without aborting.void
When zk is working both files should be returned
-
Field Details
-
CLASS_RULE
-
LOG
-
TEST_UTIL
-
OLD_WALS_DIR
-
OLD_PROCEDURE_WALS_DIR
-
conf
-
POOL
-
-
Constructor Details
-
TestLogsCleaner
public TestLogsCleaner()
-
-
Method Details
-
setUpBeforeClass
- Throws:
Exception
-
tearDownAfterClass
- Throws:
Exception
-
beforeTest
- Throws:
IOException
-
testLogCleaning
This tests verifies LogCleaner works correctly with WALs and Procedure WALs located in the same oldWALs directory. Created files: - 2 invalid files - 5 old Procedure WALs - 30 old WALs from which 3 are in replication - 5 recent Procedure WALs - 1 recent WAL - 1 very new WAL (timestamp in future) - masterProcedureWALs subdirectory Files which should stay: - 3 replication WALs - 2 new WALs - 5 latest Procedure WALs - masterProcedureWALs subdirectory- Throws:
Exception
-
testZooKeeperAbort
ReplicationLogCleaner should be able to ride over ZooKeeper errors without aborting.- Throws:
Exception
-
testZooKeeperNormal
When zk is working both files should be returned- Throws:
Exception
- from ZK watcher
-
testOnConfigurationChange
- Throws:
Exception
-
createFiles
private void createFiles(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path parentDir, int numOfFiles) throws IOException - Throws:
IOException
-