@InterfaceAudience.Private class MultiRowMutationProcessor extends BaseRowProcessor<org.apache.hadoop.hbase.protobuf.generated.MultiRowMutationProtos.MultiRowMutationProcessorRequest,org.apache.hadoop.hbase.protobuf.generated.MultiRowMutationProtos.MultiRowMutationProcessorResponse>
MultiRowProcessor that performs multiple puts and deletes.| Modifier and Type | Field and Description |
|---|---|
(package private) MiniBatchOperationInProgress<Mutation> |
miniBatch |
(package private) Collection<Mutation> |
mutations |
(package private) Collection<byte[]> |
rowsToLock |
| Constructor and Description |
|---|
MultiRowMutationProcessor(Collection<Mutation> mutations,
Collection<byte[]> rowsToLock) |
| Modifier and Type | Method and Description |
|---|---|
org.apache.hadoop.hbase.protobuf.generated.MultiRowMutationProtos.MultiRowMutationProcessorRequest |
getRequestData()
This method should return any additional data that is needed on the
server side to construct the RowProcessor.
|
org.apache.hadoop.hbase.protobuf.generated.MultiRowMutationProtos.MultiRowMutationProcessorResponse |
getResult()
Obtain the processing result.
|
Collection<byte[]> |
getRowsToLock()
Rows to lock while operation.
|
void |
initialize(org.apache.hadoop.hbase.protobuf.generated.MultiRowMutationProtos.MultiRowMutationProcessorRequest msg)
This method should initialize any field(s) of the RowProcessor with
a parsing of the passed message bytes (used on the server side).
|
void |
postBatchMutate(HRegion region)
The hook to be executed after the process() and applying the Mutations to region.
|
void |
postProcess(HRegion region,
WALEdit walEdit,
boolean success)
The hook to be executed after process() and applying the Mutations to region.
|
void |
preBatchMutate(HRegion region,
WALEdit walEdit)
The hook to be executed after the process() but before applying the Mutations to region.
|
void |
preProcess(HRegion region,
WALEdit walEdit)
The hook to be executed before process().
|
void |
process(long now,
HRegion region,
List<Mutation> mutationsToApply,
WALEdit walEdit)
HRegion handles the locks and MVCC and invokes this method properly.
|
boolean |
readOnly()
Is this operation read only? If this is true, process() should not add
any mutations or it throws IOException.
|
Durability |
useDurability() |
getClusterIds, getNameCollection<byte[]> rowsToLock
Collection<Mutation> mutations
MiniBatchOperationInProgress<Mutation> miniBatch
MultiRowMutationProcessor(Collection<Mutation> mutations, Collection<byte[]> rowsToLock)
public Collection<byte[]> getRowsToLock()
RowProcessorRowProcessor
to avoid deadlock.public boolean readOnly()
RowProcessorpublic org.apache.hadoop.hbase.protobuf.generated.MultiRowMutationProtos.MultiRowMutationProcessorResponse getResult()
RowProcessorpublic void process(long now,
HRegion region,
List<Mutation> mutationsToApply,
WALEdit walEdit)
throws IOException
RowProcessorIsolationLevel.READ_UNCOMMITTED for scan because
we advance MVCC after releasing the locks for optimization purpose.now - the current system millisecondregion - the HRegionmutationsToApply - the output mutations to apply to memstorewalEdit - the output WAL edits to apply to write ahead logIOExceptionpublic void preProcess(HRegion region, WALEdit walEdit) throws IOException
RowProcessorpreProcess in interface RowProcessor<org.apache.hadoop.hbase.protobuf.generated.MultiRowMutationProtos.MultiRowMutationProcessorRequest,org.apache.hadoop.hbase.protobuf.generated.MultiRowMutationProtos.MultiRowMutationProcessorResponse>preProcess in class BaseRowProcessor<org.apache.hadoop.hbase.protobuf.generated.MultiRowMutationProtos.MultiRowMutationProcessorRequest,org.apache.hadoop.hbase.protobuf.generated.MultiRowMutationProtos.MultiRowMutationProcessorResponse>region - the HRegionwalEdit - the output WAL edits to apply to write ahead logIOExceptionpublic void preBatchMutate(HRegion region, WALEdit walEdit) throws IOException
RowProcessorpreBatchMutate in interface RowProcessor<org.apache.hadoop.hbase.protobuf.generated.MultiRowMutationProtos.MultiRowMutationProcessorRequest,org.apache.hadoop.hbase.protobuf.generated.MultiRowMutationProtos.MultiRowMutationProcessorResponse>preBatchMutate in class BaseRowProcessor<org.apache.hadoop.hbase.protobuf.generated.MultiRowMutationProtos.MultiRowMutationProcessorRequest,org.apache.hadoop.hbase.protobuf.generated.MultiRowMutationProtos.MultiRowMutationProcessorResponse>walEdit - the output WAL edits to apply to write ahead logIOExceptionpublic void postBatchMutate(HRegion region) throws IOException
RowProcessorRowProcessor.postProcess(HRegion, WALEdit, boolean) is this hook will
be executed before the mvcc transaction completion.postBatchMutate in interface RowProcessor<org.apache.hadoop.hbase.protobuf.generated.MultiRowMutationProtos.MultiRowMutationProcessorRequest,org.apache.hadoop.hbase.protobuf.generated.MultiRowMutationProtos.MultiRowMutationProcessorResponse>postBatchMutate in class BaseRowProcessor<org.apache.hadoop.hbase.protobuf.generated.MultiRowMutationProtos.MultiRowMutationProcessorRequest,org.apache.hadoop.hbase.protobuf.generated.MultiRowMutationProtos.MultiRowMutationProcessorResponse>IOExceptionpublic void postProcess(HRegion region, WALEdit walEdit, boolean success) throws IOException
RowProcessorpostProcess in interface RowProcessor<org.apache.hadoop.hbase.protobuf.generated.MultiRowMutationProtos.MultiRowMutationProcessorRequest,org.apache.hadoop.hbase.protobuf.generated.MultiRowMutationProtos.MultiRowMutationProcessorResponse>postProcess in class BaseRowProcessor<org.apache.hadoop.hbase.protobuf.generated.MultiRowMutationProtos.MultiRowMutationProcessorRequest,org.apache.hadoop.hbase.protobuf.generated.MultiRowMutationProtos.MultiRowMutationProcessorResponse>region - the HRegionwalEdit - the output WAL edits to apply to write ahead logsuccess - true if batch operation is successful otherwise false.IOExceptionpublic org.apache.hadoop.hbase.protobuf.generated.MultiRowMutationProtos.MultiRowMutationProcessorRequest getRequestData()
RowProcessorRowProcessor.initialize(Message msg) method. If there is no RowProcessor
specific data then null should be returned.public void initialize(org.apache.hadoop.hbase.protobuf.generated.MultiRowMutationProtos.MultiRowMutationProcessorRequest msg)
RowProcessorpublic Durability useDurability()
useDurability in interface RowProcessor<org.apache.hadoop.hbase.protobuf.generated.MultiRowMutationProtos.MultiRowMutationProcessorRequest,org.apache.hadoop.hbase.protobuf.generated.MultiRowMutationProtos.MultiRowMutationProcessorResponse>useDurability in class BaseRowProcessor<org.apache.hadoop.hbase.protobuf.generated.MultiRowMutationProtos.MultiRowMutationProcessorRequest,org.apache.hadoop.hbase.protobuf.generated.MultiRowMutationProtos.MultiRowMutationProcessorResponse>Durability to useCopyright © 2007–2019 The Apache Software Foundation. All rights reserved.