Class TestLogsCleaner

java.lang.Object
org.apache.hadoop.hbase.master.cleaner.TestLogsCleaner

@Tag("org.apache.hadoop.hbase.testclassification.MasterTests") @Tag("org.apache.hadoop.hbase.testclassification.MediumTests") public class TestLogsCleaner extends Object
  • Field Details

    • LOG

      private static final org.slf4j.Logger LOG
    • TEST_UTIL

      private static final HBaseTestingUtil TEST_UTIL
    • OLD_WALS_DIR

      private static final org.apache.hadoop.fs.Path OLD_WALS_DIR
    • OLD_PROCEDURE_WALS_DIR

      private static final org.apache.hadoop.fs.Path OLD_PROCEDURE_WALS_DIR
    • conf

      private static org.apache.hadoop.conf.Configuration conf
    • POOL

      private static org.apache.hadoop.hbase.master.cleaner.DirScanPool POOL
    • peerId

      private static String peerId
    • masterServices

      private org.apache.hadoop.hbase.master.MasterServices masterServices
    • queueStorage

      private org.apache.hadoop.hbase.replication.ReplicationQueueStorage queueStorage
  • Constructor Details

  • Method Details

    • setUpBeforeClass

      @BeforeAll public static void setUpBeforeClass() throws Exception
      Throws:
      Exception
    • tearDownAfterClass

      @AfterAll public static void tearDownAfterClass() throws Exception
      Throws:
      Exception
    • beforeTest

      @BeforeEach public void beforeTest(org.junit.jupiter.api.TestInfo testInfo) throws Exception
      Throws:
      Exception
    • testLogCleaning

      @Test public void testLogCleaning() throws Exception
      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
    • testOnConfigurationChange

      @Test public void testOnConfigurationChange() throws Exception
      Throws:
      Exception
    • createFiles

      private void createFiles(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path parentDir, int numOfFiles) throws IOException
      Throws:
      IOException