static class HRegion.ReplayBatchOperation extends HRegion.BatchOperation<WALSplitUtil.MutationReplay>
HRegion.MutationBatchOperation
as most
of the logic is same.HRegion.BatchOperation.Visitor
Modifier and Type | Field and Description |
---|---|
private long |
origLogSeqNum |
atomic, durability, familyCellMaps, nextIndexToProcess, observedExceptions, operations, region, retCodeDetails, walEditsFromCoprocessors
Constructor and Description |
---|
ReplayBatchOperation(HRegion region,
WALSplitUtil.MutationReplay[] operations,
long origLogSeqNum) |
Modifier and Type | Method and Description |
---|---|
void |
checkAndPrepare()
Validates each mutation and prepares a batch for write.
|
protected void |
checkAndPreparePut(Put p)
During replay, there could exist column families which are removed between region server
failure and replay
|
void |
closeRegionOperation() |
void |
completeMiniBatchOperations(MiniBatchOperationInProgress<Mutation> miniBatchOp,
MultiVersionConcurrencyControl.WriteEntry writeEntry)
This method completes mini-batch operations by calling postBatchMutate() CP hook (if
required) and completing mvcc.
|
Mutation |
getMutation(int index) |
Mutation[] |
getMutationsForCoprocs()
This method is potentially expensive and useful mostly for non-replay CP path.
|
long |
getNonce(int index) |
long |
getNonceGroup(int index) |
long |
getOrigLogSeqNum() |
boolean |
isInReplay() |
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 |
startRegionOperation() |
MultiVersionConcurrencyControl.WriteEntry |
writeMiniBatchOperationsToMemStore(MiniBatchOperationInProgress<Mutation> miniBatchOp,
MultiVersionConcurrencyControl.WriteEntry writeEntry)
Write mini-batch operations to MemStore
|
applyFamilyMapToMemStore, buildWALEdits, checkAndPrepareMutation, checkAndPrepareMutation, createMiniBatch, doPostOpCleanupForMiniBatch, getClusterIds, isAtomic, isDone, isOperationPending, lockRowsAndBuildMiniBatch, size, visitBatchOperations, writeMiniBatchOperationsToMemStore
private long origLogSeqNum
public ReplayBatchOperation(HRegion region, WALSplitUtil.MutationReplay[] operations, long origLogSeqNum)
public Mutation getMutation(int index)
getMutation
in class HRegion.BatchOperation<WALSplitUtil.MutationReplay>
public long getNonceGroup(int index)
getNonceGroup
in class HRegion.BatchOperation<WALSplitUtil.MutationReplay>
public long getNonce(int index)
getNonce
in class HRegion.BatchOperation<WALSplitUtil.MutationReplay>
public Mutation[] getMutationsForCoprocs()
HRegion.BatchOperation
getMutationsForCoprocs
in class HRegion.BatchOperation<WALSplitUtil.MutationReplay>
public boolean isInReplay()
isInReplay
in class HRegion.BatchOperation<WALSplitUtil.MutationReplay>
public long getOrigLogSeqNum()
getOrigLogSeqNum
in class HRegion.BatchOperation<WALSplitUtil.MutationReplay>
public void startRegionOperation() throws IOException
startRegionOperation
in class HRegion.BatchOperation<WALSplitUtil.MutationReplay>
IOException
public void closeRegionOperation() throws IOException
closeRegionOperation
in class HRegion.BatchOperation<WALSplitUtil.MutationReplay>
IOException
protected void checkAndPreparePut(Put p) throws IOException
checkAndPreparePut
in class HRegion.BatchOperation<WALSplitUtil.MutationReplay>
IOException
public void checkAndPrepare() throws IOException
HRegion.BatchOperation
HRegion.BatchOperation.checkAndPrepareMutation(int, long)
in a
'for' loop over mutations.checkAndPrepare
in class HRegion.BatchOperation<WALSplitUtil.MutationReplay>
IOException
public void prepareMiniBatchOperations(MiniBatchOperationInProgress<Mutation> miniBatchOp, long timestamp, List<Region.RowLock> acquiredRowLocks) throws IOException
HRegion.BatchOperation
prepareMiniBatchOperations
in class HRegion.BatchOperation<WALSplitUtil.MutationReplay>
IOException
public MultiVersionConcurrencyControl.WriteEntry writeMiniBatchOperationsToMemStore(MiniBatchOperationInProgress<Mutation> miniBatchOp, MultiVersionConcurrencyControl.WriteEntry writeEntry) throws IOException
HRegion.BatchOperation
writeMiniBatchOperationsToMemStore
in class HRegion.BatchOperation<WALSplitUtil.MutationReplay>
IOException
public void completeMiniBatchOperations(MiniBatchOperationInProgress<Mutation> miniBatchOp, MultiVersionConcurrencyControl.WriteEntry writeEntry) throws IOException
HRegion.BatchOperation
completeMiniBatchOperations
in class HRegion.BatchOperation<WALSplitUtil.MutationReplay>
IOException
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.