@InterfaceAudience.LimitedPrivate(value="Coprocesssor") public class MiniBatchOperationInProgress<T> extends Object
Modifier and Type | Field and Description |
---|---|
private int |
cellCount |
private int |
firstIndex |
private int |
lastIndexExclusive |
private int |
numOfAppends |
private int |
numOfDeletes |
private int |
numOfIncrements |
private int |
numOfPuts |
private T[] |
operations |
private Mutation[][] |
operationsFromCoprocessors |
private int |
readyToWriteCount |
private OperationStatus[] |
retCodeDetails |
private WALEdit |
walEditForReplicateIfExistsSkipWAL
Here is for HBASE-26993,saving the all the
Mutation s if there is
Durability#SKIP_WAL in HRegion.BatchOperation.buildWALEdits(org.apache.hadoop.hbase.regionserver.MiniBatchOperationInProgress<org.apache.hadoop.hbase.client.Mutation>) for
HRegion.doMiniBatchMutate(org.apache.hadoop.hbase.regionserver.HRegion.BatchOperation<?>) to also replicate Mutation which is
Durability#SKIP_WAL to region replica. |
private WALEdit[] |
walEditsFromCoprocessors |
Constructor and Description |
---|
MiniBatchOperationInProgress(T[] operations,
OperationStatus[] retCodeDetails,
WALEdit[] walEditsFromCoprocessors,
int firstIndex,
int lastIndexExclusive,
int readyToWriteCount) |
Modifier and Type | Method and Description |
---|---|
void |
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 |
getCellCount() |
int |
getLastIndexExclusive() |
int |
getNumOfAppends() |
int |
getNumOfDeletes() |
int |
getNumOfIncrements() |
int |
getNumOfPuts() |
T |
getOperation(int index)
Returns The operation(Mutation) at the specified position.
|
Mutation[] |
getOperationsFromCoprocessors(int index) |
OperationStatus |
getOperationStatus(int index)
Returns Gets the status code for the operation(Mutation) at the specified position.
|
int |
getReadyToWriteCount() |
WALEdit |
getWalEdit(int index)
Returns Gets the walEdit for the operation(Mutation) at the specified position.
|
WALEdit |
getWalEditForReplicateIfExistsSkipWAL() |
void |
incrementNumOfAppends() |
void |
incrementNumOfDeletes() |
void |
incrementNumOfIncrements() |
void |
incrementNumOfPuts() |
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.
|
private final T[] operations
private Mutation[][] operationsFromCoprocessors
private final OperationStatus[] retCodeDetails
private final WALEdit[] walEditsFromCoprocessors
private final int firstIndex
private final int lastIndexExclusive
private int readyToWriteCount
private int cellCount
private int numOfPuts
private int numOfDeletes
private int numOfIncrements
private int numOfAppends
private WALEdit walEditForReplicateIfExistsSkipWAL
Mutation
s if there is
Durability#SKIP_WAL
in HRegion.BatchOperation.buildWALEdits(org.apache.hadoop.hbase.regionserver.MiniBatchOperationInProgress<org.apache.hadoop.hbase.client.Mutation>)
for
HRegion.doMiniBatchMutate(org.apache.hadoop.hbase.regionserver.HRegion.BatchOperation<?>)
to also replicate Mutation
which is
Durability#SKIP_WAL
to region replica.public MiniBatchOperationInProgress(T[] operations, OperationStatus[] retCodeDetails, WALEdit[] walEditsFromCoprocessors, int firstIndex, int lastIndexExclusive, int readyToWriteCount)
public int size()
public T getOperation(int index)
public void setOperationStatus(int index, OperationStatus opStatus)
RegionObserver
can make HRegion to skip
Mutations.public OperationStatus getOperationStatus(int index)
public void setWalEdit(int index, WALEdit walEdit)
public WALEdit getWalEdit(int index)
private int getAbsoluteIndex(int index)
public void addOperationsFromCP(int index, Mutation[] newOperations)
index
- the index that corresponds to the original mutation index in the batchnewOperations
- the Mutations to addpublic Mutation[] getOperationsFromCoprocessors(int index)
public int getReadyToWriteCount()
public int getLastIndexExclusive()
public int getCellCount()
public void addCellCount(int cellCount)
public int getNumOfPuts()
public void incrementNumOfPuts()
public int getNumOfDeletes()
public void incrementNumOfDeletes()
public int getNumOfIncrements()
public void incrementNumOfIncrements()
public int getNumOfAppends()
public void incrementNumOfAppends()
public WALEdit getWalEditForReplicateIfExistsSkipWAL()
public void setWalEditForReplicateIfExistsSkipWAL(WALEdit walEditForReplicateSkipWAL)
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.