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
Modifier and TypeFieldDescriptionprivate int
private final int
private final int
private int
private int
private int
private int
private final T[]
private Mutation[][]
private int
private final OperationStatus[]
private WALEdit
Here is for HBASE-26993,saving the all theMutation
s if there isDurability#SKIP_WAL
inHRegion.BatchOperation#buildWALEdits
forHRegion.doMiniBatchMutate(org.apache.hadoop.hbase.regionserver.HRegion.BatchOperation<?>)
to also replicateMutation
which isDurability#SKIP_WAL
to region replica.private final WALEdit[]
-
Constructor Summary
ConstructorDescriptionMiniBatchOperationInProgress
(T[] operations, OperationStatus[] retCodeDetails, WALEdit[] walEditsFromCoprocessors, int firstIndex, int lastIndexExclusive, int readyToWriteCount) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addCellCount
(int cellCount) void
addOperationsFromCP
(int index, Mutation[] newOperations) Add more Mutations corresponding to the Mutation at the given index to be committed atomically in the same batch.private int
getAbsoluteIndex
(int index) int
int
int
int
int
int
getOperation
(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.int
getWalEdit
(int index) Returns Gets the walEdit for the operation(Mutation) at the specified position.void
void
void
void
void
setOperationStatus
(int index, OperationStatus opStatus) Sets the status code for the operation(Mutation) at the specified position.void
setWalEdit
(int index, WALEdit walEdit) Sets the walEdit for the operation(Mutation) at the specified position.void
setWalEditForReplicateIfExistsSkipWAL
(WALEdit walEditForReplicateSkipWAL) int
size()
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 theMutation
s if there isDurability#SKIP_WAL
inHRegion.BatchOperation#buildWALEdits
forHRegion.doMiniBatchMutate(org.apache.hadoop.hbase.regionserver.HRegion.BatchOperation<?>)
to also replicateMutation
which isDurability#SKIP_WAL
to 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,RegionObserver
can 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
-