@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().Modifier and Type | Method and Description |
---|---|
List<UUID> |
getClusterIds()
Deprecated.
Returns The cluster ids that have the change.
|
String |
getName()
Deprecated.
Human readable name of the processor
|
S |
getRequestData()
Deprecated.
This method should return any additional data that is needed on the server side to construct
the RowProcessor.
|
T |
getResult()
Deprecated.
Obtain the processing result.
|
Collection<byte[]> |
getRowsToLock()
Deprecated.
Rows to lock while operation.
|
void |
initialize(S msg)
Deprecated.
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)
Deprecated.
The hook to be executed after the process() and applying the Mutations to region.
|
void |
postProcess(HRegion region,
WALEdit walEdit,
boolean success)
Deprecated.
The hook to be executed after process() and applying the Mutations to region.
|
void |
preBatchMutate(HRegion region,
WALEdit walEdit)
Deprecated.
The hook to be executed after the process() but before applying the Mutations to region.
|
void |
preProcess(HRegion region,
WALEdit walEdit)
Deprecated.
The hook to be executed before process().
|
void |
process(long now,
HRegion region,
List<Mutation> mutations,
WALEdit walEdit)
Deprecated.
HRegion handles the locks and MVCC and invokes this method properly.
|
boolean |
readOnly()
Deprecated.
Is this operation read only? If this is true, process() should not add any mutations or it
throws IOException.
|
Durability |
useDurability()
Deprecated.
Returns The
Durability to use |
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 logIOException
void preProcess(HRegion region, WALEdit walEdit) throws IOException
region
- the HRegionwalEdit
- the output WAL edits to apply to write ahead logIOException
void preBatchMutate(HRegion region, WALEdit walEdit) throws IOException
walEdit
- the output WAL edits to apply to write ahead logIOException
void postBatchMutate(HRegion region) throws IOException
postProcess(HRegion, WALEdit, boolean)
is this hook will
be executed before the mvcc transaction completion.IOException
void 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.IOException
List<UUID> getClusterIds()
String getName()
S getRequestData() throws IOException
initialize(Message msg)
method. If
there is no RowProcessor specific data then null should be returned.IOException
void initialize(S msg) throws IOException
IOException
Durability useDurability()
Durability
to useCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.