@Deprecated @InterfaceAudience.LimitedPrivate(value="Coprocesssor") @InterfaceStability.Evolving public interface RowProcessor<S extends com.google.protobuf.Message,T extends com.google.protobuf.Message>
Region.processRowsWithLocks(RowProcessor).
This class performs scans and generates mutations and WAL edits.
The locks and MVCC will be handled by HRegion.
The RowProcessor user code could have data that needs to be
sent across for proper initialization at the server side. The generic type
parameter S is the type of the request data sent to the server.
The generic type parameter T is the return type of RowProcessor.getResult().| 限定符和类型 | 方法和说明 |
|---|---|
List<UUID> |
getClusterIds()
已过时。
|
String |
getName()
已过时。
Human readable name of the processor
|
S |
getRequestData()
已过时。
This method should return any additional data that is needed on the
server side to construct the RowProcessor.
|
T |
getResult()
已过时。
Obtain the processing result.
|
Collection<byte[]> |
getRowsToLock()
已过时。
Rows to lock while operation.
|
void |
initialize(S 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> mutations,
WALEdit walEdit)
已过时。
HRegion handles the locks and MVCC and invokes this method properly.
|
boolean |
readOnly()
已过时。
Is this operation read only?
|
Durability |
useDurability()
已过时。
|
Collection<byte[]> getRowsToLock()
RowProcessor
to avoid deadlock.T getResult()
boolean readOnly()
void process(long now,
HRegion region,
List<Mutation> mutations,
WALEdit walEdit)
throws IOException
IsolationLevel.READ_UNCOMMITTED for scan because
we advance MVCC after releasing the locks for optimization purpose.now - the current system millisecondregion - the HRegionmutations - the output mutations to apply to memstorewalEdit - the output WAL edits to apply to write ahead logIOExceptionvoid preProcess(HRegion region, WALEdit walEdit) throws IOException
region - the HRegionwalEdit - the output WAL edits to apply to write ahead logIOExceptionvoid preBatchMutate(HRegion region, WALEdit walEdit) throws IOException
walEdit - the output WAL edits to apply to write ahead logIOExceptionvoid postBatchMutate(HRegion region) throws IOException
postProcess(HRegion, WALEdit, boolean) is this hook will
be executed before the mvcc transaction completion.IOExceptionvoid postProcess(HRegion region, WALEdit walEdit, boolean success) throws IOException
region - the HRegionwalEdit - the output WAL edits to apply to write ahead logsuccess - true if batch operation is successful otherwise false.IOExceptionString getName()
S getRequestData() throws IOException
initialize(Message msg) method. If there is no RowProcessor
specific data then null should be returned.IOExceptionvoid initialize(S msg) throws IOException
msg - IOExceptionDurability useDurability()
Durability to useCopyright © 2007–2019 The Apache Software Foundation. All rights reserved.