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
FieldsModifier and TypeFieldDescriptionprivate static final intDeprecated.private static final intDeprecated.private long[]Deprecated.Keeps track of procedure ids which belong to this bitmap's range and have been deleted.private static final intDeprecated.private long[]Deprecated.Set of procedures which have been modified since lastresetModified().private booleanDeprecated.MimicsProcedureStoreTracker.partial.private longDeprecated.Offset of bitmap i.e.private static final longDeprecated. -
Constructor Summary
ConstructorsConstructorDescriptionBitSetNode(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 longalignDown(long x) Deprecated.Returns lower boundary (aligned to multiple of BITS_PER_WORD) of bitmap range x belongs to.private static longalignUp(long x) Deprecated.Returns upper boundary (aligned to multiple of BITS_PER_WORD) of bitmap range x belongs to.booleancanGrow(long procId) Deprecated.booleancanMerge(BitSetNode rightNode) Deprecated.booleancontains(long procId) Deprecated.org.apache.hadoop.hbase.shaded.protobuf.generated.ProcedureProtos.ProcedureStoreTracker.TrackerNodeconvert()Deprecated.Convert to org.apache.hadoop.hbase.protobuf.generated.ProcedureProtos.ProcedureStoreTracker.TrackerNode protobuf.voiddelete(long procId) Deprecated.voiddump()Deprecated.longDeprecated.longDeprecated.long[]Deprecated.Returns all the active procedure ids in this bit set.private intgetBitmapIndex(long procId) Deprecated.longgetEnd()Deprecated.Inclusive.longgetStart()Deprecated.voidgrow(long procId) Deprecated.voidinsertOrUpdate(long procId) Deprecated.booleanDeprecated.Returns true, if all the procedures has been modified.isDeleted(long procId) Deprecated.booleanisEmpty()Deprecated.Returns true, if there are no active procedures in this BitSetNode, else false.booleanisModified(long procId) Deprecated.voidmerge(BitSetNode rightNode) Deprecated.voidDeprecated.toString()Deprecated.voidDeprecated.(package private) voidupdateState(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.
-