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
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanDeprecated.If true, do not remove bits corresponding to deleted procedures.private static final org.slf4j.LoggerDeprecated.private final TreeMap<Long,BitSetNode> Deprecated.private longDeprecated.private longDeprecated.(package private) booleanDeprecated.If true, it means tracker has incomplete information about the active/deleted procedures. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddelete(long procId) Deprecated.voiddelete(long[] procIds) Deprecated.private BitSetNodedelete(BitSetNode node, long procId) Deprecated.voiddump()Deprecated.longDeprecated.long[]Deprecated.Will be used when there are too many proc wal files.longDeprecated.longDeprecated.private BitSetNodegetOrCreateNode(long procId) Deprecated.private BitSetNodegrowNode(BitSetNode node, long procId) Deprecated.Growsnodeto containprocIdand updates the map.voidinsert(long procId) Deprecated.voidinsert(long[] procIds) Deprecated.voidinsert(long procId, long[] subProcIds) Deprecated.private BitSetNodeinsert(BitSetNode node, long procId) Deprecated.booleanDeprecated.isDeleted(long procId) Deprecated.Ifpartialis false, returns state from the bitmap.booleanisEmpty()Deprecated.Returns true, if no procedure is active, else false.booleanisModified(long procId) Deprecated.booleanDeprecated.private BitSetNodelookupClosestNode(BitSetNode node, long procId) Deprecated.lookup the node containing the specified procId.private BitSetNodemergeNodes(BitSetNode leftNode, BitSetNode rightNode) Deprecated.MergesleftNode&rightNodeand updates the map.voidreset()Deprecated.voidDeprecated.Clears the list of updated procedure ids.voidresetTo(ProcedureStoreTracker tracker) Deprecated.Resets internal state to same as giventracker.voidresetTo(ProcedureStoreTracker tracker, boolean resetDelete) Deprecated.Resets internal state to same as giventracker, and change the deleted flag according to the modified flag ifresetDeleteis true.voidresetToProto(org.apache.hadoop.hbase.shaded.protobuf.generated.ProcedureProtos.ProcedureStoreTracker trackerProtoBuf) Deprecated.voidsetDeleted(long procId, boolean isDeleted) Deprecated.This method is used when restarting where we need to rebuild the ProcedureStoreTracker.voidDeprecated.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.voidsetDeletedIfModified(long... procId) Deprecated.Set the given bit for the procId to delete if it was modified before.voidDeprecated.private voidsetDeleteIf(ProcedureStoreTracker tracker, BiFunction<BitSetNode, Long, Boolean> func) Deprecated.voidsetKeepDeletes(boolean keepDeletes) Deprecated.voidsetMinMaxModifiedProcIds(long min, long max) Deprecated.Will be called when restarting where we need to rebuild the ProcedureStoreTracker.voidsetPartialFlag(boolean isPartial) Deprecated.org.apache.hadoop.hbase.shaded.protobuf.generated.ProcedureProtos.ProcedureStoreTrackertoProto()Deprecated.Builds org.apache.hadoop.hbase.protobuf.generated.ProcedureProtos.ProcedureStoreTracker protocol buffer from current state.private voidtrackProcIds(long procId) Deprecated.voidupdate(long procId) Deprecated.private BitSetNodeupdate(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 ifresetDeleteis true. Does deep copy of the bitmap. TheresetDeletewill be set to true when building cleanup tracker, please see the comments inBitSetNode(BitSetNode, boolean)to learn how we change the deleted flag ifresetDeleteis 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 theBitSetNodeexists, 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 theprocIdare 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.Ifpartialis 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.Growsnodeto containprocIdand updates the map.- Returns:
BitSetNodeinstance which containsprocId.
-
mergeNodes
Deprecated.MergesleftNode&rightNodeand 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
-