Class MiniBatchOperationInProgress<T>
java.lang.Object
org.apache.hadoop.hbase.regionserver.MiniBatchOperationInProgress<T>
- Record Components:
T- Pair<Mutation, Integer> pair of Mutations and associated rowlock ids .
Wraps together the mutations which are applied as a batch to the region and their operation
status and WALEdits.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intprivate final intprivate final intprivate intprivate intprivate intprivate intprivate final T[]private Mutation[][]private intprivate final OperationStatus[]private WALEditHere is for HBASE-26993,saving the all theMutations if there isDurability#SKIP_WALinHRegion.BatchOperation#buildWALEditsforHRegion.doMiniBatchMutate(org.apache.hadoop.hbase.regionserver.HRegion.BatchOperation<?>)to also replicateMutationwhich isDurability#SKIP_WALto region replica.private final WALEdit[] -
Constructor Summary
ConstructorsConstructorDescriptionMiniBatchOperationInProgress(T[] operations, OperationStatus[] retCodeDetails, WALEdit[] walEditsFromCoprocessors, int firstIndex, int lastIndexExclusive, int readyToWriteCount) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCellCount(int cellCount) voidaddOperationsFromCP(int index, Mutation[] newOperations) Add more Mutations corresponding to the Mutation at the given index to be committed atomically in the same batch.private intgetAbsoluteIndex(int index) intintintintintintgetOperation(int index) Returns The operation(Mutation) at the specified position.Mutation[]getOperationsFromCoprocessors(int index) getOperationStatus(int index) Returns Gets the status code for the operation(Mutation) at the specified position.intgetWalEdit(int index) Returns Gets the walEdit for the operation(Mutation) at the specified position.voidvoidvoidvoidvoidsetOperationStatus(int index, OperationStatus opStatus) Sets the status code for the operation(Mutation) at the specified position.voidsetWalEdit(int index, WALEdit walEdit) Sets the walEdit for the operation(Mutation) at the specified position.voidsetWalEditForReplicateIfExistsSkipWAL(WALEdit walEditForReplicateSkipWAL) intsize()Returns The number of operations(Mutations) involved in this batch.
-
Field Details
-
operations
-
operationsFromCoprocessors
-
retCodeDetails
-
walEditsFromCoprocessors
-
firstIndex
-
lastIndexExclusive
-
readyToWriteCount
-
cellCount
-
numOfPuts
-
numOfDeletes
-
numOfIncrements
-
numOfAppends
-
walEditForReplicateIfExistsSkipWAL
Here is for HBASE-26993,saving the all theMutations if there isDurability#SKIP_WALinHRegion.BatchOperation#buildWALEditsforHRegion.doMiniBatchMutate(org.apache.hadoop.hbase.regionserver.HRegion.BatchOperation<?>)to also replicateMutationwhich isDurability#SKIP_WALto region replica.
-
-
Constructor Details
-
MiniBatchOperationInProgress
public MiniBatchOperationInProgress(T[] operations, OperationStatus[] retCodeDetails, WALEdit[] walEditsFromCoprocessors, int firstIndex, int lastIndexExclusive, int readyToWriteCount)
-
-
Method Details
-
size
Returns The number of operations(Mutations) involved in this batch. -
getOperation
Returns The operation(Mutation) at the specified position. -
setOperationStatus
Sets the status code for the operation(Mutation) at the specified position. By setting this status,RegionObservercan make HRegion to skip Mutations. -
getOperationStatus
Returns Gets the status code for the operation(Mutation) at the specified position. -
setWalEdit
Sets the walEdit for the operation(Mutation) at the specified position. -
getWalEdit
Returns Gets the walEdit for the operation(Mutation) at the specified position. -
getAbsoluteIndex
-
addOperationsFromCP
Add more Mutations corresponding to the Mutation at the given index to be committed atomically in the same batch. These mutations are applied to the WAL and applied to the memstore as well. The timestamp of the cells in the given Mutations MUST be obtained from the original mutation. Note: The durability from CP will be replaced by the durability of corresponding mutation. Note: Currently only supports Put and Delete operations.- Parameters:
index- the index that corresponds to the original mutation index in the batchnewOperations- the Mutations to add
-
getOperationsFromCoprocessors
-
getReadyToWriteCount
-
getLastIndexExclusive
-
getCellCount
-
addCellCount
-
getNumOfPuts
-
incrementNumOfPuts
-
getNumOfDeletes
-
incrementNumOfDeletes
-
getNumOfIncrements
-
incrementNumOfIncrements
-
getNumOfAppends
-
incrementNumOfAppends
-
getWalEditForReplicateIfExistsSkipWAL
-
setWalEditForReplicateIfExistsSkipWAL
-