org.apache.hadoop.hbase.regionserver
Class MiniBatchOperationInProgress<T>
java.lang.Object
org.apache.hadoop.hbase.regionserver.MiniBatchOperationInProgress<T>
- Type Parameters:
T
- Pair pair of Mutations and associated rowlock ids .
@InterfaceAudience.Public
@InterfaceStability.Evolving
public class MiniBatchOperationInProgress<T>
- extends Object
Wraps together the mutations which are applied as a batch to the region and their operation
status and WALEdits.
- See Also:
RegionObserver.preBatchMutate(ObserverContext, MiniBatchOperationInProgress)
,
RegionObserver.postBatchMutate(ObserverContext, MiniBatchOperationInProgress)
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MiniBatchOperationInProgress
public MiniBatchOperationInProgress(T[] operations,
OperationStatus[] retCodeDetails,
WALEdit[] walEditsFromCoprocessors,
int firstIndex,
int lastIndexExclusive)
size
public int size()
- Returns:
- The number of operations(Mutations) involved in this batch.
getOperation
public T getOperation(int index)
- Parameters:
index
-
- Returns:
- The operation(Mutation) at the specified position.
setOperationStatus
public void setOperationStatus(int index,
OperationStatus opStatus)
- Sets the status code for the operation(Mutation) at the specified position.
By setting this status,
RegionObserver
can make HRegion to skip Mutations.
- Parameters:
index
- opStatus
-
getOperationStatus
public OperationStatus getOperationStatus(int index)
- Parameters:
index
-
- Returns:
- Gets the status code for the operation(Mutation) at the specified position.
setWalEdit
public void setWalEdit(int index,
WALEdit walEdit)
- Sets the walEdit for the operation(Mutation) at the specified position.
- Parameters:
index
- walEdit
-
getWalEdit
public WALEdit getWalEdit(int index)
- Parameters:
index
-
- Returns:
- Gets the walEdit for the operation(Mutation) at the specified position.
Copyright © 2013 The Apache Software Foundation. All Rights Reserved.