Class TestRecoveredEditsOutputSink

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

  • Field Details

    • CLASS_RULE

      public static final HBaseClassTestRule CLASS_RULE
    • 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

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

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

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

      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