Class BitSetNode
java.lang.Object
org.apache.hadoop.hbase.procedure2.store.wal.BitSetNode
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
Modifier and TypeFieldDescriptionprivate 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 lastresetModified()
.private boolean
Deprecated.MimicsProcedureStoreTracker.partial
.private long
Deprecated.Offset of bitmap i.e.private static final long
Deprecated. -
Constructor Summary
ConstructorDescriptionBitSetNode
(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 TypeMethodDescriptionprivate 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
convert()
Deprecated.Convert to org.apache.hadoop.hbase.protobuf.generated.ProcedureProtos.ProcedureStoreTracker.TrackerNode protobuf.void
delete
(long procId) Deprecated.void
dump()
Deprecated.long
Deprecated.long
Deprecated.long[]
Deprecated.Returns all the active procedure ids in this bit set.private int
getBitmapIndex
(long procId) Deprecated.long
getEnd()
Deprecated.Inclusive.long
getStart()
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
isEmpty()
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.toString()
Deprecated.void
Deprecated.(package private) void
updateState
(long procId, boolean isDeleted) Deprecated.
-
Field Details
-
WORD_MASK
Deprecated.- See Also:
-
ADDRESS_BITS_PER_WORD
Deprecated.- See Also:
-
BITS_PER_WORD
Deprecated.- See Also:
-
MAX_NODE_SIZE
Deprecated.- See Also:
-
partial
Deprecated.MimicsProcedureStoreTracker.partial
. It will effect how we fill the new deleted bits when growing. -
modified
Deprecated.Set of procedures which have been modified since lastresetModified()
. Useful to track procedures which have been modified since last WAL write. -
deleted
Deprecated.Keeps track of procedure ids which belong to this bitmap's range and have been deleted. This represents global state since it's not reset on WAL rolls. -
start
Deprecated.Offset of bitmap i.e. procedure id corresponding to first bit.
-
-
Constructor Details
-
BitSetNode
Deprecated. -
BitSetNode
public BitSetNode(org.apache.hadoop.hbase.shaded.protobuf.generated.ProcedureProtos.ProcedureStoreTracker.TrackerNode data) Deprecated. -
BitSetNode
Deprecated.
-
-
Method Details
-
dump
Deprecated. -
insertOrUpdate
Deprecated. -
delete
Deprecated. -
getStart
Deprecated. -
getEnd
Deprecated.Inclusive. -
contains
Deprecated. -
isDeleted
Deprecated. -
isModified
Deprecated. -
isAllModified
Deprecated.Returns true, if all the procedures has been modified. -
getActiveProcIds
Deprecated.Returns all the active procedure ids in this bit set. -
isEmpty
Deprecated.Returns true, if there are no active procedures in this BitSetNode, else false. -
resetModified
Deprecated. -
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
Deprecated. -
canMerge
Deprecated. -
grow
Deprecated. -
merge
Deprecated. -
toString
Deprecated. -
getActiveMinProcId
Deprecated. -
getActiveMaxProcId
Deprecated. -
getBitmapIndex
Deprecated. -
updateState
Deprecated. -
alignUp
Deprecated.Returns upper boundary (aligned to multiple of BITS_PER_WORD) of bitmap range x belongs to. -
alignDown
Deprecated.Returns lower boundary (aligned to multiple of BITS_PER_WORD) of bitmap range x belongs to.
-