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

Compaction WALEdit gives NPEs with Replication enabled

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • 0.95.1
    • 0.98.0, 0.95.2
    • None
    • None
    • Reviewed

    Description

      If you enable replication, and get a compaction requested, you'll see this in the logs:

      2013-07-24 15:16:38,831 ERROR [regionserver60020-smallCompactions-1374704194254] regionserver.CompactSplitThread: Compaction failed Request = regionName=TestTable,00000000000000000000057204,1374704192994.6bb7c58d1e6cc99fbfe04592e44fbc35., storeName=info, fileCount=4, fileSize=335.1m (115.4m, 115.4m, 69.0m, 35.2m), priority=6, time=1374704194257521000
      java.lang.NullPointerException
      	at org.apache.hadoop.hbase.replication.regionserver.Replication.visitLogEntryBeforeWrite(Replication.java:215)
      	at org.apache.hadoop.hbase.regionserver.wal.FSHLog.doWrite(FSHLog.java:1204)
      	at org.apache.hadoop.hbase.regionserver.wal.FSHLog.append(FSHLog.java:890)
      	at org.apache.hadoop.hbase.regionserver.wal.FSHLog.append(FSHLog.java:840)
      	at org.apache.hadoop.hbase.regionserver.wal.HLogUtil.writeCompactionMarker(HLogUtil.java:262)
      	at org.apache.hadoop.hbase.regionserver.HStore.writeCompactionWalRecord(HStore.java:1026)
      	at org.apache.hadoop.hbase.regionserver.HStore.compact(HStore.java:973)
      	at org.apache.hadoop.hbase.regionserver.HRegion.compact(HRegion.java:1278)
      	at org.apache.hadoop.hbase.regionserver.CompactSplitThread$CompactionRunner.run(CompactSplitThread.java:465)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
      	at java.lang.Thread.run(Thread.java:680)
      
      

      It's a simple case of filtering METAFAMILY like this:

      if (kv.matchingFamily(WALEdit.METAFAMILY)) continue;

      and add a unit test.

      Attachments

        1. HBASE-9038.patch
          3 kB
          Jean-Daniel Cryans

        Activity

          People

            jdcryans Jean-Daniel Cryans
            jdcryans Jean-Daniel Cryans
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: