Class TestLogsCleaner
java.lang.Object
org.apache.hadoop.hbase.master.cleaner.TestLogsCleaner
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static class(package private) static class -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final HBaseClassTestRuleprivate static org.apache.hadoop.conf.Configurationprivate static final org.slf4j.Loggerprivate static final org.apache.hadoop.fs.Pathprivate static final org.apache.hadoop.fs.Pathprivate static org.apache.hadoop.hbase.master.cleaner.DirScanPoolprivate static final HBaseTestingUtility -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidprivate voidcreateFiles(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path parentDir, int numOfFiles) static voidstatic voidvoidThis tests verifies LogCleaner works correctly with WALs and Procedure WALs located in the same oldWALs directory.voidvoidReplicationLogCleaner should be able to ride over ZooKeeper errors without aborting.voidWhen 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
-