Class ProcedureStoreTracker
java.lang.Object
org.apache.hadoop.hbase.procedure2.store.wal.ProcedureStoreTracker
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.
Keeps track of live procedures. It can be used by the ProcedureStore to identify which procedures
are already deleted/completed to avoid the deserialization step on restart
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionprivate boolean
Deprecated.If true, do not remove bits corresponding to deleted procedures.private static final org.slf4j.Logger
Deprecated.private final TreeMap<Long,
BitSetNode> Deprecated.private long
Deprecated.private long
Deprecated.(package private) boolean
Deprecated.If true, it means tracker has incomplete information about the active/deleted procedures. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
delete
(long procId) Deprecated.void
delete
(long[] procIds) Deprecated.private BitSetNode
delete
(BitSetNode node, long procId) Deprecated.void
dump()
Deprecated.long
Deprecated.long[]
Deprecated.Will be used when there are too many proc wal files.long
Deprecated.long
Deprecated.private BitSetNode
getOrCreateNode
(long procId) Deprecated.private BitSetNode
growNode
(BitSetNode node, long procId) Deprecated.Growsnode
to containprocId
and updates the map.void
insert
(long procId) Deprecated.void
insert
(long[] procIds) Deprecated.void
insert
(long procId, long[] subProcIds) Deprecated.private BitSetNode
insert
(BitSetNode node, long procId) Deprecated.boolean
Deprecated.isDeleted
(long procId) Deprecated.Ifpartial
is false, returns state from the bitmap.boolean
isEmpty()
Deprecated.Returns true, if no procedure is active, else false.boolean
isModified
(long procId) Deprecated.boolean
Deprecated.private BitSetNode
lookupClosestNode
(BitSetNode node, long procId) Deprecated.lookup the node containing the specified procId.private BitSetNode
mergeNodes
(BitSetNode leftNode, BitSetNode rightNode) Deprecated.MergesleftNode
&rightNode
and updates the map.void
reset()
Deprecated.void
Deprecated.Clears the list of updated procedure ids.void
resetTo
(ProcedureStoreTracker tracker) Deprecated.Resets internal state to same as giventracker
.void
resetTo
(ProcedureStoreTracker tracker, boolean resetDelete) Deprecated.Resets internal state to same as giventracker
, and change the deleted flag according to the modified flag ifresetDelete
is true.void
resetToProto
(org.apache.hadoop.hbase.shaded.protobuf.generated.ProcedureProtos.ProcedureStoreTracker trackerProtoBuf) Deprecated.void
setDeleted
(long procId, boolean isDeleted) Deprecated.This method is used when restarting where we need to rebuild the ProcedureStoreTracker.void
Deprecated.For the global tracker, we will use this method to build the holdingCleanupTracker, as the modified flags will be cleared after rolling so we only need to test the deleted flags.void
setDeletedIfModified
(long... procId) Deprecated.Set the given bit for the procId to delete if it was modified before.void
Deprecated.private void
setDeleteIf
(ProcedureStoreTracker tracker, BiFunction<BitSetNode, Long, Boolean> func) Deprecated.void
setKeepDeletes
(boolean keepDeletes) Deprecated.void
setMinMaxModifiedProcIds
(long min, long max) Deprecated.Will be called when restarting where we need to rebuild the ProcedureStoreTracker.void
setPartialFlag
(boolean isPartial) Deprecated.org.apache.hadoop.hbase.shaded.protobuf.generated.ProcedureProtos.ProcedureStoreTracker
toProto()
Deprecated.Builds org.apache.hadoop.hbase.protobuf.generated.ProcedureProtos.ProcedureStoreTracker protocol buffer from current state.private void
trackProcIds
(long procId) Deprecated.void
update
(long procId) Deprecated.private BitSetNode
update
(BitSetNode node, long procId) Deprecated.
-
Field Details
-
LOG
Deprecated. -
map
Deprecated. -
keepDeletes
Deprecated.If true, do not remove bits corresponding to deleted procedures. Note that this can result in huge bitmaps overtime. Currently, it's set to true only when building tracker state from logs during recovery. During recovery, if we are sure that a procedure has been deleted, reading its old update entries can be skipped. -
partial
boolean partialDeprecated.If true, it means tracker has incomplete information about the active/deleted procedures. It's set to true only when recovering from old logs. SeeisDeleted(long)
docs to understand it's real use. -
minModifiedProcId
Deprecated. -
maxModifiedProcId
Deprecated.
-
-
Constructor Details
-
ProcedureStoreTracker
Deprecated.
-
-
Method Details
-
resetToProto
public void resetToProto(org.apache.hadoop.hbase.shaded.protobuf.generated.ProcedureProtos.ProcedureStoreTracker trackerProtoBuf) Deprecated. -
resetTo
Deprecated.Resets internal state to same as giventracker
. Does deep copy of the bitmap. -
resetTo
Deprecated.Resets internal state to same as giventracker
, and change the deleted flag according to the modified flag ifresetDelete
is true. Does deep copy of the bitmap. TheresetDelete
will be set to true when building cleanup tracker, please see the comments inBitSetNode(BitSetNode, boolean)
to learn how we change the deleted flag ifresetDelete
is true. -
insert
Deprecated. -
insert
Deprecated. -
insert
Deprecated. -
insert
Deprecated. -
update
Deprecated. -
update
Deprecated. -
delete
Deprecated. -
delete
Deprecated. -
delete
Deprecated. -
setMinMaxModifiedProcIds
Deprecated.Will be called when restarting where we need to rebuild the ProcedureStoreTracker. -
setDeleted
Deprecated.This method is used when restarting where we need to rebuild the ProcedureStoreTracker. Thedelete(long)
method above assume that theBitSetNode
exists, but when restart this is not true, as we will read the wal files in reverse order so a delete may come first. -
setDeletedIfModified
Deprecated.Set the given bit for the procId to delete if it was modified before. This method is used to test whether a procedure wal file can be safely deleted, as if all the procedures in the given procedure wal file has been modified in the new procedure wal files, then we can delete it. -
setDeleteIf
Deprecated. -
setDeletedIfDeletedByThem
Deprecated.For the global tracker, we will use this method to build the holdingCleanupTracker, as the modified flags will be cleared after rolling so we only need to test the deleted flags. -
setDeletedIfModifiedInBoth
Deprecated.Similar withsetDeletedIfModified(long...)
, but here theprocId
are given by thetracker
. If a procedure is modified by us, and also by the giventracker
, then we mark it as deleted.- See Also:
-
lookupClosestNode
Deprecated.lookup the node containing the specified procId.- Parameters:
node
- cached node to check before doing a lookupprocId
- the procId to lookup- Returns:
- the node that may contains the procId or null
-
trackProcIds
Deprecated. -
getModifiedMinProcId
Deprecated. -
getModifiedMaxProcId
Deprecated. -
reset
Deprecated. -
isModified
Deprecated. -
isDeleted
Deprecated.Ifpartial
is false, returns state from the bitmap. If no state is found forprocId
, returns YES. If partial is true, tracker doesn't have complete view of system state, so it returns MAYBE if there is no update for the procedure or if it doesn't have a state in bitmap. Otherwise, returns state from the bitmap. -
getActiveMinProcId
Deprecated. -
setKeepDeletes
Deprecated. -
isPartial
Deprecated. -
setPartialFlag
Deprecated. -
isEmpty
Deprecated.Returns true, if no procedure is active, else false. -
isAllModified
Deprecated.- Returns:
- true if all procedure was modified or deleted since last call to
resetModified()
.
-
getAllActiveProcIds
Deprecated.Will be used when there are too many proc wal files. We will rewrite the states of the active procedures in the oldest proc wal file so that we can delete it.- Returns:
- all the active procedure ids in this tracker.
-
resetModified
Deprecated.Clears the list of updated procedure ids. This doesn't affect global list of active procedure ids. -
getOrCreateNode
Deprecated. -
growNode
Deprecated.Growsnode
to containprocId
and updates the map.- Returns:
BitSetNode
instance which containsprocId
.
-
mergeNodes
Deprecated.MergesleftNode
&rightNode
and updates the map. -
dump
Deprecated. -
toProto
public org.apache.hadoop.hbase.shaded.protobuf.generated.ProcedureProtos.ProcedureStoreTracker toProto() throws IOExceptionDeprecated.Builds org.apache.hadoop.hbase.protobuf.generated.ProcedureProtos.ProcedureStoreTracker protocol buffer from current state.- Throws:
IOException
-