org.apache.hadoop.hbase.coprocessor
Interface RegionServerObserver

All Superinterfaces:
Coprocessor
All Known Implementing Classes:
AccessController, BaseRegionServerObserver, VisibilityController.VisibilityReplication

public interface RegionServerObserver
extends Coprocessor


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.hadoop.hbase.Coprocessor
Coprocessor.State
 
Field Summary
 
Fields inherited from interface org.apache.hadoop.hbase.Coprocessor
PRIORITY_HIGHEST, PRIORITY_LOWEST, PRIORITY_SYSTEM, PRIORITY_USER, VERSION
 
Method Summary
 ReplicationEndpoint postCreateReplicationEndPoint(ObserverContext<RegionServerCoprocessorEnvironment> ctx, ReplicationEndpoint endpoint)
          This will be called after the replication endpoint is instantiated.
 void postMerge(ObserverContext<RegionServerCoprocessorEnvironment> c, HRegion regionA, HRegion regionB, HRegion mergedRegion)
          called after the regions merge.
 void postMergeCommit(ObserverContext<RegionServerCoprocessorEnvironment> ctx, HRegion regionA, HRegion regionB, HRegion mergedRegion)
          This will be called after PONR step as part of regions merge transaction.
 void postReplicateLogEntries(ObserverContext<RegionServerCoprocessorEnvironment> ctx, List<AdminProtos.WALEntry> entries, CellScanner cells)
          This will be called after executing replication request to shipping log entries.
 void postRollBackMerge(ObserverContext<RegionServerCoprocessorEnvironment> ctx, HRegion regionA, HRegion regionB)
          This will be called after the roll back of the regions merge.
 void postRollWALWriterRequest(ObserverContext<RegionServerCoprocessorEnvironment> ctx)
          This will be called after executing user request to roll a region server WAL.
 void preMerge(ObserverContext<RegionServerCoprocessorEnvironment> ctx, HRegion regionA, HRegion regionB)
          Called before the regions merge.
 void preMergeCommit(ObserverContext<RegionServerCoprocessorEnvironment> ctx, HRegion regionA, HRegion regionB, List<Mutation> metaEntries)
          This will be called before PONR step as part of regions merge transaction.
 void preReplicateLogEntries(ObserverContext<RegionServerCoprocessorEnvironment> ctx, List<AdminProtos.WALEntry> entries, CellScanner cells)
          This will be called before executing replication request to shipping log entries.
 void preRollBackMerge(ObserverContext<RegionServerCoprocessorEnvironment> ctx, HRegion regionA, HRegion regionB)
          This will be called before the roll back of the regions merge.
 void preRollWALWriterRequest(ObserverContext<RegionServerCoprocessorEnvironment> ctx)
          This will be called before executing user request to roll a region server WAL.
 void preStopRegionServer(ObserverContext<RegionServerCoprocessorEnvironment> env)
          Called before stopping region server.
 
Methods inherited from interface org.apache.hadoop.hbase.Coprocessor
start, stop
 

Method Detail

preStopRegionServer

void preStopRegionServer(ObserverContext<RegionServerCoprocessorEnvironment> env)
                         throws IOException
Called before stopping region server.

Parameters:
env - An instance of RegionServerCoprocessorEnvironment
Throws:
IOException - Signals that an I/O exception has occurred.

preMerge

void preMerge(ObserverContext<RegionServerCoprocessorEnvironment> ctx,
              HRegion regionA,
              HRegion regionB)
              throws IOException
Called before the regions merge. Call ObserverContext.bypass() to skip the merge.

Parameters:
ctx -
regionA -
regionB -
Throws:
IOException - if an error occurred on the coprocessor
IOException

postMerge

void postMerge(ObserverContext<RegionServerCoprocessorEnvironment> c,
               HRegion regionA,
               HRegion regionB,
               HRegion mergedRegion)
               throws IOException
called after the regions merge.

Parameters:
c -
regionA -
regionB -
mergedRegion -
Throws:
IOException

preMergeCommit

void preMergeCommit(ObserverContext<RegionServerCoprocessorEnvironment> ctx,
                    HRegion regionA,
                    HRegion regionB,
                    @MetaMutationAnnotation
                    List<Mutation> metaEntries)
                    throws IOException
This will be called before PONR step as part of regions merge transaction. Calling ObserverContext.bypass() rollback the merge

Parameters:
ctx -
regionA -
regionB -
metaEntries - mutations to execute on hbase:meta atomically with regions merge updates. Any puts or deletes to execute on hbase:meta can be added to the mutations.
Throws:
IOException

postMergeCommit

void postMergeCommit(ObserverContext<RegionServerCoprocessorEnvironment> ctx,
                     HRegion regionA,
                     HRegion regionB,
                     HRegion mergedRegion)
                     throws IOException
This will be called after PONR step as part of regions merge transaction.

Parameters:
ctx -
regionA -
regionB -
mergedRegion -
Throws:
IOException

preRollBackMerge

void preRollBackMerge(ObserverContext<RegionServerCoprocessorEnvironment> ctx,
                      HRegion regionA,
                      HRegion regionB)
                      throws IOException
This will be called before the roll back of the regions merge.

Parameters:
ctx -
regionA -
regionB -
Throws:
IOException

postRollBackMerge

void postRollBackMerge(ObserverContext<RegionServerCoprocessorEnvironment> ctx,
                       HRegion regionA,
                       HRegion regionB)
                       throws IOException
This will be called after the roll back of the regions merge.

Parameters:
ctx -
regionA -
regionB -
Throws:
IOException

preRollWALWriterRequest

void preRollWALWriterRequest(ObserverContext<RegionServerCoprocessorEnvironment> ctx)
                             throws IOException
This will be called before executing user request to roll a region server WAL.

Parameters:
ctx - An instance of ObserverContext
Throws:
IOException - Signals that an I/O exception has occurred.

postRollWALWriterRequest

void postRollWALWriterRequest(ObserverContext<RegionServerCoprocessorEnvironment> ctx)
                              throws IOException
This will be called after executing user request to roll a region server WAL.

Parameters:
ctx - An instance of ObserverContext
Throws:
IOException - Signals that an I/O exception has occurred.

postCreateReplicationEndPoint

ReplicationEndpoint postCreateReplicationEndPoint(ObserverContext<RegionServerCoprocessorEnvironment> ctx,
                                                  ReplicationEndpoint endpoint)
This will be called after the replication endpoint is instantiated.

Parameters:
ctx -
endpoint - - the base endpoint for replication
Returns:
the endpoint to use during replication.

preReplicateLogEntries

void preReplicateLogEntries(ObserverContext<RegionServerCoprocessorEnvironment> ctx,
                            List<AdminProtos.WALEntry> entries,
                            CellScanner cells)
                            throws IOException
This will be called before executing replication request to shipping log entries.

Parameters:
ctx - An instance of ObserverContext
entries - list of WALEntries to replicate
cells - Cells that the WALEntries refer to (if cells is non-null)
Throws:
IOException - Signals that an I/O exception has occurred.

postReplicateLogEntries

void postReplicateLogEntries(ObserverContext<RegionServerCoprocessorEnvironment> ctx,
                             List<AdminProtos.WALEntry> entries,
                             CellScanner cells)
                             throws IOException
This will be called after executing replication request to shipping log entries.

Parameters:
ctx - An instance of ObserverContext
entries - list of WALEntries to replicate
cells - Cells that the WALEntries refer to (if cells is non-null)
Throws:
IOException - Signals that an I/O exception has occurred.


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