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 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.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
-
-
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
-