Class AbstractTestProtobufLog

java.lang.Object
org.apache.hadoop.hbase.regionserver.wal.AbstractTestProtobufLog
Direct Known Subclasses:
TestAsyncProtobufLog, TestProtobufLog

public abstract class AbstractTestProtobufLog extends Object
WAL tests that can be reused across providers.
  • Field Details

    • TEST_UTIL

      protected static final HBaseTestingUtil TEST_UTIL
    • fs

      protected org.apache.hadoop.fs.FileSystem fs
    • dir

      protected org.apache.hadoop.fs.Path dir
    • wals

      protected org.apache.hadoop.hbase.wal.WALFactory wals
    • currentTest

  • Constructor Details

  • Method Details

    • setUp

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

      @AfterEach public void tearDown() throws Exception
      Throws:
      Exception
    • setUpBeforeClass

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

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

      @Test public void testWALTrailer() throws IOException
      Reads the WAL with and without WALTrailer.
      Throws:
      IOException
    • doRead

      private void doRead(boolean withTrailer) throws IOException
      Appends entries in the WAL and reads it.
      Parameters:
      withTrailer - If 'withTrailer' is true, it calls a close on the WALwriter before reading so that a trailer is appended to the WAL. Otherwise, it starts reading after the sync call. This means that reader is not aware of the trailer. In this scenario, if the reader tries to read the trailer in its next() call, it returns false from ProtoBufLogReader.
      Throws:
      IOException
    • createWriter

      protected abstract org.apache.hadoop.hbase.wal.WALProvider.Writer createWriter(org.apache.hadoop.fs.Path path) throws IOException
      Throws:
      IOException