org.apache.hadoop.hbase.regionserver
Class MiniBatchOperationInProgress<T>

java.lang.Object
  extended by org.apache.hadoop.hbase.regionserver.MiniBatchOperationInProgress<T>
Type Parameters:
T - Pair pair of Mutations and associated rowlock ids .

@InterfaceAudience.Private
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)

Constructor Summary
MiniBatchOperationInProgress(T[] operations, OperationStatus[] retCodeDetails, WALEdit[] walEditsFromCoprocessors, int firstIndex, int lastIndexExclusive)
           
 
Method Summary
 T getOperation(int index)
           
 OperationStatus getOperationStatus(int index)
           
 WALEdit getWalEdit(int index)
           
 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()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MiniBatchOperationInProgress

public MiniBatchOperationInProgress(T[] operations,
                                    OperationStatus[] retCodeDetails,
                                    WALEdit[] walEditsFromCoprocessors,
                                    int firstIndex,
                                    int lastIndexExclusive)
Method Detail

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 © 2007–2016 The Apache Software Foundation. All rights reserved.