@InterfaceAudience.Private
public interface RowProcessor<S extends Message,T extends Message>
| Modifier and Type | Method and Description |
|---|---|
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 |
postProcess(HRegion region,
WALEdit walEdit)
The hook to be executed after process().
|
void |
preProcess(HRegion region,
WALEdit walEdit)
The hook to be executed before process().
|
void |
process(long now,
HRegion region,
List<KeyValue> mutations,
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() |
Collection<byte[]> getRowsToLock()
RowProcessor
to avoid deadlock.T getResult()
boolean readOnly()
void process(long now,
HRegion region,
List<KeyValue> 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 postProcess(HRegion region, WALEdit walEdit) throws IOException
region - the HRegionwalEdit - the output WAL edits to apply to write ahead logIOExceptionString 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 © 2014 The Apache Software Foundation. All Rights Reserved.