Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-23962

Wrong combination of hlog reader and writer could crash regionserver

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Patch Available
    • Major
    • Resolution: Unresolved
    • None
    • None
    • regionserver
    • None

    Description

      Problem

      I found out that there two configuration parameters: `hbase.regionserver.hlog.reader.impl` and `hbase.regionserver.hlog.writer.impl` which should be used as a pair.

      There are two options for the reader: `ProtobufLogReader` and `SecureProtobufLogReader`.

      And four options for the writer: `ProtobufLogWriter`, `SecureProtobufLogWriter`, `AsyncProtobufLogWriter` and `SecureAsyncProtobufLogWriter`.

      Using the wrong combination of the reader and the writer will throw an exception. For example, if setting the writer to SecureProtobufLogWriter and setting the reader to ProtobufLogReader(default value), an exception will be thrown:

      java.io.IOException: Got unknown writer class: SecureProtobufLogWriter
          at org.apache.hadoop.hbase.regionserver.wal.ProtobufLogReader.initInternal(ProtobufLogReader.java:224)
          at org.apache.hadoop.hbase.regionserver.wal.ProtobufLogReader.initReader(ProtobufLogReader.java:173)
          at org.apache.hadoop.hbase.regionserver.wal.ReaderBase.init(ReaderBase.java:65)
          at org.apache.hadoop.hbase.regionserver.wal.ProtobufLogReader.init(ProtobufLogReader.java:168)
          at org.apache.hadoop.hbase.wal.WALFactory.createReader(WALFactory.java:321)
          at org.apache.hadoop.hbase.wal.WALFactory.createReader(WALFactory.java:303)
          at org.apache.hadoop.hbase.wal.WALFactory.createReader(WALFactory.java:291)
          at org.apache.hadoop.hbase.wal.LogRecoveredEditsOutputSink.deleteOneWithFewerEntries(LogRecoveredEditsOutputSink.java:109)
          at org.apache.hadoop.hbase.wal.LogRecoveredEditsOutputSink.closeWriter(LogRecoveredEditsOutputSink.java:240)
          at org.apache.hadoop.hbase.wal.LogRecoveredEditsOutputSink$2.call(LogRecoveredEditsOutputSink.java:196)
          at org.apache.hadoop.hbase.wal.LogRecoveredEditsOutputSink$2.call(LogRecoveredEditsOutputSink.java:192)
          at java.util.concurrent.FutureTask.run(FutureTask.java:266)
          at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
          at java.util.concurrent.FutureTask.run(FutureTask.java:266)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
          at java.lang.Thread.run(Thread.java:748)

      The current description of these two parameters (in the `hbase-default.xml`) doesn’t tell the users anything about which combination is right or not.

       

      Improvement

      We can add some more information in the description of these two parameters in `hbase-default.xml` to tell the users about the correct combinations.

      I upload a patch for improving the description.

      Attachments

        Activity

          People

            Unassigned Unassigned
            ctest.team Ctest
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: