Class HRegion.ReplayBatchOperation
java.lang.Object
org.apache.hadoop.hbase.regionserver.HRegion.BatchOperation<WALSplitUtil.MutationReplay>
org.apache.hadoop.hbase.regionserver.HRegion.ReplayBatchOperation
- Enclosing class:
- HRegion
private static final class HRegion.ReplayBatchOperation
extends HRegion.BatchOperation<WALSplitUtil.MutationReplay>
Batch of mutations for replay. Base class is shared with
HRegion.MutationBatchOperation
as most
of the logic is same.-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.hadoop.hbase.regionserver.HRegion.BatchOperation
HRegion.BatchOperation.Visitor
-
Field Summary
Fields inherited from class org.apache.hadoop.hbase.regionserver.HRegion.BatchOperation
atomic, durability, familyCellMaps, nextIndexToProcess, observedExceptions, operations, region, results, retCodeDetails, walEditsFromCoprocessors
-
Constructor Summary
ConstructorDescriptionReplayBatchOperation
(HRegion region, WALSplitUtil.MutationReplay[] operations, long origLogSeqNum) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Validates each mutation and prepares a batch for write.protected void
During replay, there could exist column families which are removed between region server failure and replayvoid
void
completeMiniBatchOperations
(MiniBatchOperationInProgress<Mutation> miniBatchOp, MultiVersionConcurrencyControl.WriteEntry writeEntry) This method completes mini-batch operations by calling postBatchMutate() CP hook (if required) and completing mvcc.getMutation
(int index) Mutation[]
This method is potentially expensive and useful mostly for non-replay CP path.long
getNonce
(int index) long
getNonceGroup
(int index) long
boolean
void
prepareMiniBatchOperations
(MiniBatchOperationInProgress<Mutation> miniBatchOp, long timestamp, List<Region.RowLock> acquiredRowLocks) If necessary, calls preBatchMutate() CP hook for a mini-batch and updates metrics, cell count, tags and timestamp for all cells of all operations in a mini-batch.void
writeMiniBatchOperationsToMemStore
(MiniBatchOperationInProgress<Mutation> miniBatchOp, MultiVersionConcurrencyControl.WriteEntry writeEntry) Write mini-batch operations to MemStoreMethods inherited from class org.apache.hadoop.hbase.regionserver.HRegion.BatchOperation
applyFamilyMapToMemStore, buildWALEdits, checkAndPrepareMutation, checkAndPrepareMutation, createMiniBatch, doPostOpCleanupForMiniBatch, getClusterIds, isAtomic, isDone, isOperationPending, lockRowsAndBuildMiniBatch, size, visitBatchOperations, writeMiniBatchOperationsToMemStore
-
Field Details
-
origLogSeqNum
-
-
Constructor Details
-
ReplayBatchOperation
public ReplayBatchOperation(HRegion region, WALSplitUtil.MutationReplay[] operations, long origLogSeqNum)
-
-
Method Details
-
getMutation
- Specified by:
getMutation
in classHRegion.BatchOperation<WALSplitUtil.MutationReplay>
-
getNonceGroup
- Specified by:
getNonceGroup
in classHRegion.BatchOperation<WALSplitUtil.MutationReplay>
-
getNonce
- Specified by:
getNonce
in classHRegion.BatchOperation<WALSplitUtil.MutationReplay>
-
getMutationsForCoprocs
Description copied from class:HRegion.BatchOperation
This method is potentially expensive and useful mostly for non-replay CP path.- Specified by:
getMutationsForCoprocs
in classHRegion.BatchOperation<WALSplitUtil.MutationReplay>
-
isInReplay
- Specified by:
isInReplay
in classHRegion.BatchOperation<WALSplitUtil.MutationReplay>
-
getOrigLogSeqNum
- Specified by:
getOrigLogSeqNum
in classHRegion.BatchOperation<WALSplitUtil.MutationReplay>
-
startRegionOperation
- Specified by:
startRegionOperation
in classHRegion.BatchOperation<WALSplitUtil.MutationReplay>
- Throws:
IOException
-
closeRegionOperation
- Specified by:
closeRegionOperation
in classHRegion.BatchOperation<WALSplitUtil.MutationReplay>
- Throws:
IOException
-
checkAndPreparePut
During replay, there could exist column families which are removed between region server failure and replay- Specified by:
checkAndPreparePut
in classHRegion.BatchOperation<WALSplitUtil.MutationReplay>
- Throws:
IOException
-
checkAndPrepare
Description copied from class:HRegion.BatchOperation
Validates each mutation and prepares a batch for write. If necessary (non-replay case), runs CP prePut()/preDelete()/preIncrement()/preAppend() hooks for all mutations in a batch. This is intended to operate on entire batch and will be called from outside of class to check and prepare batch. This can be implemented by calling helper methodHRegion.BatchOperation.checkAndPrepareMutation(int, long)
in a 'for' loop over mutations.- Specified by:
checkAndPrepare
in classHRegion.BatchOperation<WALSplitUtil.MutationReplay>
- Throws:
IOException
-
prepareMiniBatchOperations
public void prepareMiniBatchOperations(MiniBatchOperationInProgress<Mutation> miniBatchOp, long timestamp, List<Region.RowLock> acquiredRowLocks) throws IOException Description copied from class:HRegion.BatchOperation
If necessary, calls preBatchMutate() CP hook for a mini-batch and updates metrics, cell count, tags and timestamp for all cells of all operations in a mini-batch.- Specified by:
prepareMiniBatchOperations
in classHRegion.BatchOperation<WALSplitUtil.MutationReplay>
- Throws:
IOException
-
writeMiniBatchOperationsToMemStore
public MultiVersionConcurrencyControl.WriteEntry writeMiniBatchOperationsToMemStore(MiniBatchOperationInProgress<Mutation> miniBatchOp, MultiVersionConcurrencyControl.WriteEntry writeEntry) throws IOException Description copied from class:HRegion.BatchOperation
Write mini-batch operations to MemStore- Specified by:
writeMiniBatchOperationsToMemStore
in classHRegion.BatchOperation<WALSplitUtil.MutationReplay>
- Throws:
IOException
-
completeMiniBatchOperations
public void completeMiniBatchOperations(MiniBatchOperationInProgress<Mutation> miniBatchOp, MultiVersionConcurrencyControl.WriteEntry writeEntry) throws IOException Description copied from class:HRegion.BatchOperation
This method completes mini-batch operations by calling postBatchMutate() CP hook (if required) and completing mvcc.- Overrides:
completeMiniBatchOperations
in classHRegion.BatchOperation<WALSplitUtil.MutationReplay>
- Throws:
IOException
-