org.apache.hadoop.hbase.regionserver
Class BaseRowProcessor<S extends com.google.protobuf.Message,T extends com.google.protobuf.Message>

java.lang.Object
  extended by org.apache.hadoop.hbase.regionserver.BaseRowProcessor<S,T>
All Implemented Interfaces:
RowProcessor<S,T>

@InterfaceAudience.LimitedPrivate(value="Coprocesssor")
@InterfaceStability.Evolving
public abstract class BaseRowProcessor<S extends com.google.protobuf.Message,T extends com.google.protobuf.Message>
extends Object
implements RowProcessor<S,T>

Base class for RowProcessor with some default implementations.


Constructor Summary
BaseRowProcessor()
           
 
Method Summary
 List<UUID> getClusterIds()
           
 String getName()
          Human readable name of the processor
 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().
 Durability useDurability()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.hadoop.hbase.regionserver.RowProcessor
getRequestData, getResult, getRowsToLock, initialize, process, readOnly
 

Constructor Detail

BaseRowProcessor

public BaseRowProcessor()
Method Detail

preProcess

public void preProcess(HRegion region,
                       WALEdit walEdit)
                throws IOException
Description copied from interface: RowProcessor
The hook to be executed before process().

Specified by:
preProcess in interface RowProcessor<S extends com.google.protobuf.Message,T extends com.google.protobuf.Message>
Parameters:
region - the HRegion
walEdit - the output WAL edits to apply to write ahead log
Throws:
IOException

preBatchMutate

public void preBatchMutate(HRegion region,
                           WALEdit walEdit)
                    throws IOException
Description copied from interface: RowProcessor
The hook to be executed after the process() but before applying the Mutations to region. Also by the time this hook is been called, mvcc transaction is started.

Specified by:
preBatchMutate in interface RowProcessor<S extends com.google.protobuf.Message,T extends com.google.protobuf.Message>
walEdit - the output WAL edits to apply to write ahead log
Throws:
IOException

postBatchMutate

public void postBatchMutate(HRegion region)
                     throws IOException
Description copied from interface: RowProcessor
The hook to be executed after the process() and applying the Mutations to region. The difference of this one with RowProcessor.postProcess(HRegion, WALEdit, boolean) is this hook will be executed before the mvcc transaction completion.

Specified by:
postBatchMutate in interface RowProcessor<S extends com.google.protobuf.Message,T extends com.google.protobuf.Message>
Throws:
IOException

postProcess

public void postProcess(HRegion region,
                        WALEdit walEdit,
                        boolean success)
                 throws IOException
Description copied from interface: RowProcessor
The hook to be executed after process() and applying the Mutations to region.

Specified by:
postProcess in interface RowProcessor<S extends com.google.protobuf.Message,T extends com.google.protobuf.Message>
Parameters:
region - the HRegion
walEdit - the output WAL edits to apply to write ahead log
success - true if batch operation is successful otherwise false.
Throws:
IOException

getClusterIds

public List<UUID> getClusterIds()
Specified by:
getClusterIds in interface RowProcessor<S extends com.google.protobuf.Message,T extends com.google.protobuf.Message>
Returns:
The cluster ids that have the change.

getName

public String getName()
Description copied from interface: RowProcessor
Human readable name of the processor

Specified by:
getName in interface RowProcessor<S extends com.google.protobuf.Message,T extends com.google.protobuf.Message>
Returns:
The name of the processor

useDurability

public Durability useDurability()
Specified by:
useDurability in interface RowProcessor<S extends com.google.protobuf.Message,T extends com.google.protobuf.Message>
Returns:
The Durability to use


Copyright © 2007–2016 The Apache Software Foundation. All rights reserved.