Class TestRecoveredEditsOutputSink

java.lang.Object
org.apache.hadoop.hbase.wal.TestRecoveredEditsOutputSink

@Tag("org.apache.hadoop.hbase.testclassification.RegionServerTests") @Tag("org.apache.hadoop.hbase.testclassification.SmallTests") public class TestRecoveredEditsOutputSink extends Object
  • Field Details

    • wals

      private static org.apache.hadoop.hbase.wal.WALFactory wals
    • fs

      private static org.apache.hadoop.fs.FileSystem fs
    • rootDir

      private static org.apache.hadoop.fs.Path rootDir
    • TEST_UTIL

      private static final HBaseTestingUtil TEST_UTIL
    • outputSink

      private static org.apache.hadoop.hbase.wal.RecoveredEditsOutputSink outputSink
  • Constructor Details

  • Method Details

    • setUpBeforeClass

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

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

      @Test public void testCloseSuccess() throws IOException
      Throws:
      IOException
    • testCloseWALSplitInterrupted

      @Test public void testCloseWALSplitInterrupted() throws IOException
      When a WAL split is interrupted (ex. by a RegionServer abort), the thread join in finishWriterThreads() will get interrupted, rethrowing the exception without stopping the writer threads. Test to ensure that when this happens, RecoveredEditsOutputSink.close() does not rename the recoveredEdits WAL files as this can cause corruption. Please see HBASE-28569. However, the writers must still be closed.
      Throws:
      IOException
    • testCloseWALFinishWriterThreadsFailed

      When finishWriterThreads fails but does not throw an exception, ensure the writers are handled like in the exception case - the writers are closed but the recoveredEdits WAL files are not renamed.
      Throws:
      IOException