java.lang.Object
org.apache.hadoop.hbase.procedure2.store.wal.BitSetNode

@Deprecated @Private class BitSetNode extends Object
Deprecated.
Since 2.3.0, will be removed in 4.0.0. Keep here only for rolling upgrading, now we use the new region based procedure store.
A bitmap which can grow/merge with other BitSetNode (if certain conditions are met). Boundaries of bitmap are aligned to multiples of BITS_PER_WORD. So the range of a BitSetNode is from [x * K, y * K) where x and y are integers, y > x and K is BITS_PER_WORD.

We have two main bit sets to describe the state of procedures, the meanings are:

  ----------------------
 | modified | deleted |  meaning
 |     0    |   0     |  proc exists, but hasn't been updated since last resetUpdates().
 |     1    |   0     |  proc was updated (but not deleted).
 |     1    |   1     |  proc was deleted.
 |     0    |   1     |  proc doesn't exist (maybe never created, maybe deleted in past).
 ----------------------
 
The meaning of modified is that, we have modified the state of the procedure, no matter insert, update, or delete. And if it is an insert or update, we will set the deleted to 0, if not we will set the delete to 1.

For a non-partial BitSetNode, the initial modified value is 0 and deleted value is 1. For the partial one, the initial modified value is 0 and the initial deleted value is also 0. In unsetPartialFlag() we will reset the deleted to 1 if it is not modified.

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private static final int
    Deprecated.
     
    private static final int
    Deprecated.
     
    private long[]
    Deprecated.
    Keeps track of procedure ids which belong to this bitmap's range and have been deleted.
    private static final int
    Deprecated.
     
    private long[]
    Deprecated.
    Set of procedures which have been modified since last resetModified().
    private boolean
    Deprecated.
    private long
    Deprecated.
    Offset of bitmap i.e.
    private static final long
    Deprecated.
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    BitSetNode(long procId, boolean partial)
    Deprecated.
     
    BitSetNode(BitSetNode other, boolean resetDelete)
    Deprecated.
     
    BitSetNode(org.apache.hadoop.hbase.shaded.protobuf.generated.ProcedureProtos.ProcedureStoreTracker.TrackerNode data)
    Deprecated.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    private static long
    alignDown(long x)
    Deprecated.
    Returns lower boundary (aligned to multiple of BITS_PER_WORD) of bitmap range x belongs to.
    private static long
    alignUp(long x)
    Deprecated.
    Returns upper boundary (aligned to multiple of BITS_PER_WORD) of bitmap range x belongs to.
    boolean
    canGrow(long procId)
    Deprecated.
     
    boolean
    canMerge(BitSetNode rightNode)
    Deprecated.
     
    boolean
    contains(long procId)
    Deprecated.
     
    org.apache.hadoop.hbase.shaded.protobuf.generated.ProcedureProtos.ProcedureStoreTracker.TrackerNode
    Deprecated.
    Convert to org.apache.hadoop.hbase.protobuf.generated.ProcedureProtos.ProcedureStoreTracker.TrackerNode protobuf.
    void
    delete(long procId)
    Deprecated.
     
    void
    Deprecated.
     
    long
    Deprecated.
     
    long
    Deprecated.
     
    long[]
    Deprecated.
    Returns all the active procedure ids in this bit set.
    private int
    getBitmapIndex(long procId)
    Deprecated.
     
    long
    Deprecated.
    Inclusive.
    long
    Deprecated.
     
    void
    grow(long procId)
    Deprecated.
     
    void
    insertOrUpdate(long procId)
    Deprecated.
     
    boolean
    Deprecated.
    Returns true, if all the procedures has been modified.
    isDeleted(long procId)
    Deprecated.
     
    boolean
    Deprecated.
    Returns true, if there are no active procedures in this BitSetNode, else false.
    boolean
    isModified(long procId)
    Deprecated.
     
    void
    merge(BitSetNode rightNode)
    Deprecated.
     
    void
    Deprecated.
     
    Deprecated.
     
    void
    Deprecated.
     
    (package private) void
    updateState(long procId, boolean isDeleted)
    Deprecated.
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

  • Constructor Details

    • BitSetNode

      public BitSetNode(long procId, boolean partial)
      Deprecated.
    • BitSetNode

      public BitSetNode(org.apache.hadoop.hbase.shaded.protobuf.generated.ProcedureProtos.ProcedureStoreTracker.TrackerNode data)
      Deprecated.
    • BitSetNode

      public BitSetNode(BitSetNode other, boolean resetDelete)
      Deprecated.
  • Method Details

    • dump

      public void dump()
      Deprecated.
    • insertOrUpdate

      public void insertOrUpdate(long procId)
      Deprecated.
    • delete

      public void delete(long procId)
      Deprecated.
    • getStart

      public long getStart()
      Deprecated.
    • getEnd

      public long getEnd()
      Deprecated.
      Inclusive.
    • contains

      public boolean contains(long procId)
      Deprecated.
    • isDeleted

      Deprecated.
    • isModified

      public boolean isModified(long procId)
      Deprecated.
    • isAllModified

      public boolean isAllModified()
      Deprecated.
      Returns true, if all the procedures has been modified.
    • getActiveProcIds

      public long[] getActiveProcIds()
      Deprecated.
      Returns all the active procedure ids in this bit set.
    • isEmpty

      public boolean isEmpty()
      Deprecated.
      Returns true, if there are no active procedures in this BitSetNode, else false.
    • resetModified

      public void resetModified()
      Deprecated.
    • unsetPartialFlag

      public void unsetPartialFlag()
      Deprecated.
    • convert

      public org.apache.hadoop.hbase.shaded.protobuf.generated.ProcedureProtos.ProcedureStoreTracker.TrackerNode convert()
      Deprecated.
      Convert to org.apache.hadoop.hbase.protobuf.generated.ProcedureProtos.ProcedureStoreTracker.TrackerNode protobuf.
    • canGrow

      public boolean canGrow(long procId)
      Deprecated.
    • canMerge

      public boolean canMerge(BitSetNode rightNode)
      Deprecated.
    • grow

      public void grow(long procId)
      Deprecated.
    • merge

      public void merge(BitSetNode rightNode)
      Deprecated.
    • toString

      public String toString()
      Deprecated.
      Overrides:
      toString in class Object
    • getActiveMinProcId

      public long getActiveMinProcId()
      Deprecated.
    • getActiveMaxProcId

      public long getActiveMaxProcId()
      Deprecated.
    • getBitmapIndex

      private int getBitmapIndex(long procId)
      Deprecated.
    • updateState

      void updateState(long procId, boolean isDeleted)
      Deprecated.
    • alignUp

      private static long alignUp(long x)
      Deprecated.
      Returns upper boundary (aligned to multiple of BITS_PER_WORD) of bitmap range x belongs to.
    • alignDown

      private static long alignDown(long x)
      Deprecated.
      Returns lower boundary (aligned to multiple of BITS_PER_WORD) of bitmap range x belongs to.