Class WALProcedureMap

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

@Deprecated @Private class WALProcedureMap 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.
This class is used to track the active procedures when loading procedures from proc wal file.

We will read proc wal files from new to old, but when reading a proc wal file, we will still read from top to bottom, so there are two groups of methods for this class.

The first group is add(ProcedureProtos.Procedure) and remove(long). It is used when reading a proc wal file. In these methods, for the same procedure, typically the one comes later should win, please see the comment for isIncreasing(ProcedureProtos.Procedure, ProcedureProtos.Procedure) to see the exceptions.

The second group is merge(WALProcedureMap). We will have a global WALProcedureMap to hold global the active procedures, and a local WALProcedureMap to hold the active procedures for the current proc wal file. And when we finish reading a proc wal file, we will merge the local one into the global one, by calling the merge(WALProcedureMap) method of the global one and pass the local one in. In this method, for the same procedure, the one comes earlier will win, as we read the proc wal files from new to old(the reverse order).

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private static final org.slf4j.Logger
    Deprecated.
     
    private long
    Deprecated.
     
    private long
    Deprecated.
     
    private final Map<Long,org.apache.hadoop.hbase.shaded.protobuf.generated.ProcedureProtos.Procedure>
    Deprecated.
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Deprecated.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    add(org.apache.hadoop.hbase.shaded.protobuf.generated.ProcedureProtos.Procedure proc)
    Deprecated.
     
    boolean
    contains(long procId)
    Deprecated.
     
    long
    Deprecated.
     
    long
    Deprecated.
     
    Collection<org.apache.hadoop.hbase.shaded.protobuf.generated.ProcedureProtos.Procedure>
    Deprecated.
     
    boolean
    Deprecated.
     
    private static boolean
    isIncreasing(org.apache.hadoop.hbase.shaded.protobuf.generated.ProcedureProtos.Procedure current, org.apache.hadoop.hbase.shaded.protobuf.generated.ProcedureProtos.Procedure candidate)
    Deprecated.
     
    void
    Deprecated.
    Merge the given WALProcedureMap into this one.
    void
    remove(long procId)
    Deprecated.
     
    private void
    trackProcId(long procId)
    Deprecated.
     

    Methods inherited from class java.lang.Object

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

    • LOG

      private static final org.slf4j.Logger LOG
      Deprecated.
    • procMap

      private final Map<Long,org.apache.hadoop.hbase.shaded.protobuf.generated.ProcedureProtos.Procedure> procMap
      Deprecated.
    • minModifiedProcId

      private long minModifiedProcId
      Deprecated.
    • maxModifiedProcId

      private long maxModifiedProcId
      Deprecated.
  • Constructor Details

  • Method Details

    • trackProcId

      private void trackProcId(long procId)
      Deprecated.
    • isIncreasing

      private static boolean isIncreasing(org.apache.hadoop.hbase.shaded.protobuf.generated.ProcedureProtos.Procedure current, org.apache.hadoop.hbase.shaded.protobuf.generated.ProcedureProtos.Procedure candidate)
      Deprecated.
      Returns:
      True if this new procedure is 'richer' than the current one else false and we log this incidence where it appears that the WAL has older entries appended after newer ones. See HBASE-18152.
    • add

      public void add(org.apache.hadoop.hbase.shaded.protobuf.generated.ProcedureProtos.Procedure proc)
      Deprecated.
    • remove

      public void remove(long procId)
      Deprecated.
    • isEmpty

      public boolean isEmpty()
      Deprecated.
    • contains

      public boolean contains(long procId)
      Deprecated.
    • merge

      public void merge(WALProcedureMap other)
      Deprecated.
      Merge the given WALProcedureMap into this one. The WALProcedureMap passed in will be cleared after merging.
    • getProcedures

      public Collection<org.apache.hadoop.hbase.shaded.protobuf.generated.ProcedureProtos.Procedure> getProcedures()
      Deprecated.
    • getMinModifiedProcId

      public long getMinModifiedProcId()
      Deprecated.
    • getMaxModifiedProcId

      public long getMaxModifiedProcId()
      Deprecated.