Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-16003 Compacting memstore related fixes
  3. HBASE-15991

CompactingMemstore#InMemoryFlushRunnable should implement Comparable/Comparator

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 2.0.0
    • 2.0.0
    • None
    • None
    • Reviewed

    Description

      Configuring CompactingMemstore for a table fails due to the following error

      2016-06-08 23:27:03,761 ERROR [B.defaultRpcServer.handler...
      2016-06-08 23:27:03,761 ERROR [B.defaultRpcServer.handler=38,queue=8,port=16041] ipc.RpcServer: Unexpected throwable object
      java.lang.ClassCastException: org.apache.hadoop.hbase.regionserver.CompactingMemStore$InMemoryFlushRunnable cannot be cast to java.lang.Comparable
              at java.util.concurrent.PriorityBlockingQueue.siftUpComparable(PriorityBlockingQueue.java:357)
              at java.util.concurrent.PriorityBlockingQueue.offer(PriorityBlockingQueue.java:489)
              at org.apache.hadoop.hbase.util.StealJobQueue$1.offer(StealJobQueue.java:56)
              at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1361)
              at org.apache.hadoop.hbase.regionserver.CompactingMemStore.checkActiveSize(CompactingMemStore.java:258)
              at org.apache.hadoop.hbase.regionserver.AbstractMemStore.internalAdd(AbstractMemStore.java:403)
              at org.apache.hadoop.hbase.regionserver.AbstractMemStore.add(AbstractMemStore.java:113)
              at org.apache.hadoop.hbase.regionserver.HStore.add(HStore.java:630)
              at org.apache.hadoop.hbase.regionserver.HRegion.applyToMemstore(HRegion.java:3769)
              at org.apache.hadoop.hbase.regionserver.HRegion.applyFamilyMapToMemstore(HRegion.java:3740)
              at org.apache.hadoop.hbase.regionserver.HRegion.doMiniBatchMutate(HRegion.java:3222)
              at org.apache.hadoop.hbase.regionserver.HRegion.batchMutate(HRegion.java:2954)
              at org.apache.hadoop.hbase.regionserver.HRegion.batchMutate(HRegion.java:2896)
              at org.apache.hadoop.hbase.regionserver.RSRpcServices.doBatchOp(RSRpcServices.java:868)
              at org.apache.hadoop.hbase.regionserver.RSRpcServices.doNonAtomicRegionMutation(RSRpcServices.java:830)
              at org.apache.hadoop.hbase.regionserver.RSRpcServices.multi(RSRpcServices.java:2307)
              at org.apache.hadoop.hbase.protobuf.generated.ClientProtos$ClientService$2.callBlockingMethod(ClientProtos.java:34826) 
      

      It is a straight forward fix. But If we implement the Comparable the compareTo() should be based on what attribute? Should be based on the time?

      Attachments

        1. HBASE-15991_test.patch
          1 kB
          ramkrishna.s.vasudevan
        2. HBASE-15991.patch
          1 kB
          ramkrishna.s.vasudevan

        Issue Links

          Activity

            People

              ram_krish ramkrishna.s.vasudevan
              ram_krish ramkrishna.s.vasudevan
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: