org.apache.hadoop.hbase.coprocessor
Interface MasterObserver

All Superinterfaces:
Coprocessor
All Known Implementing Classes:
AccessController, BaseMasterObserver

@InterfaceAudience.Public
@InterfaceStability.Evolving
public interface MasterObserver
extends Coprocessor

Defines coprocessor hooks for interacting with operations on the HMaster process.


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
 void postAddColumn(ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName, HColumnDescriptor column)
          Called after the new column family has been created.
 void postAddColumnHandler(ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName, HColumnDescriptor column)
          Called after the new column family has been created.
 void postAssign(ObserverContext<MasterCoprocessorEnvironment> ctx, HRegionInfo regionInfo)
          Called after the region assignment has been requested.
 void postBalance(ObserverContext<MasterCoprocessorEnvironment> ctx, List<RegionPlan> plans)
          Called after the balancing plan has been submitted.
 void postBalanceSwitch(ObserverContext<MasterCoprocessorEnvironment> ctx, boolean oldValue, boolean newValue)
          Called after the flag to enable/disable balancing has changed.
 void postCloneSnapshot(ObserverContext<MasterCoprocessorEnvironment> ctx, HBaseProtos.SnapshotDescription snapshot, HTableDescriptor hTableDescriptor)
          Called after a snapshot clone operation has been requested.
 void postCreateNamespace(ObserverContext<MasterCoprocessorEnvironment> ctx, NamespaceDescriptor ns)
          Called after the createNamespace operation has been requested.
 void postCreateTable(ObserverContext<MasterCoprocessorEnvironment> ctx, HTableDescriptor desc, HRegionInfo[] regions)
          Called after the createTable operation has been requested.
 void postCreateTableHandler(ObserverContext<MasterCoprocessorEnvironment> ctx, HTableDescriptor desc, HRegionInfo[] regions)
          Called after the createTable operation has been requested.
 void postDeleteColumn(ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName, byte[] c)
          Called after the column family has been deleted.
 void postDeleteColumnHandler(ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName, byte[] c)
          Called after the column family has been deleted.
 void postDeleteNamespace(ObserverContext<MasterCoprocessorEnvironment> ctx, String namespace)
          Called after the deleteNamespace operation has been requested.
 void postDeleteSnapshot(ObserverContext<MasterCoprocessorEnvironment> ctx, HBaseProtos.SnapshotDescription snapshot)
          Called after the delete snapshot operation has been requested.
 void postDeleteTable(ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName)
          Called after the deleteTable operation has been requested.
 void postDeleteTableHandler(ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName)
          Called after HMaster deletes a table.
 void postDisableTable(ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName)
          Called after the disableTable operation has been requested.
 void postDisableTableHandler(ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName)
          Called after the disableTable operation has been requested.
 void postEnableTable(ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName)
          Called after the enableTable operation has been requested.
 void postEnableTableHandler(ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName)
          Called after the enableTable operation has been requested.
 void postGetTableDescriptors(ObserverContext<MasterCoprocessorEnvironment> ctx, List<HTableDescriptor> descriptors)
          Called after a getTableDescriptors request has been processed.
 void postModifyColumn(ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName, HColumnDescriptor descriptor)
          Called after the column family has been updated.
 void postModifyColumnHandler(ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName, HColumnDescriptor descriptor)
          Called after the column family has been updated.
 void postModifyNamespace(ObserverContext<MasterCoprocessorEnvironment> ctx, NamespaceDescriptor ns)
          Called after the modifyNamespace operation has been requested.
 void postModifyTable(ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName, HTableDescriptor htd)
          Called after the modifyTable operation has been requested.
 void postModifyTableHandler(ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName, HTableDescriptor htd)
          Called after to modifying a table's properties.
 void postMove(ObserverContext<MasterCoprocessorEnvironment> ctx, HRegionInfo region, ServerName srcServer, ServerName destServer)
          Called after the region move has been requested.
 void postRegionOffline(ObserverContext<MasterCoprocessorEnvironment> ctx, HRegionInfo regionInfo)
          Called after the region has been marked offline.
 void postRestoreSnapshot(ObserverContext<MasterCoprocessorEnvironment> ctx, HBaseProtos.SnapshotDescription snapshot, HTableDescriptor hTableDescriptor)
          Called after a snapshot restore operation has been requested.
 void postSnapshot(ObserverContext<MasterCoprocessorEnvironment> ctx, HBaseProtos.SnapshotDescription snapshot, HTableDescriptor hTableDescriptor)
          Called after the snapshot operation has been requested.
 void postStartMaster(ObserverContext<MasterCoprocessorEnvironment> ctx)
          Called immediately after an active master instance has completed initialization.
 void postUnassign(ObserverContext<MasterCoprocessorEnvironment> ctx, HRegionInfo regionInfo, boolean force)
          Called after the region unassignment has been requested.
 void preAddColumn(ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName, HColumnDescriptor column)
          Called prior to adding a new column family to the table.
 void preAddColumnHandler(ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName, HColumnDescriptor column)
          Called prior to adding a new column family to the table.
 void preAssign(ObserverContext<MasterCoprocessorEnvironment> ctx, HRegionInfo regionInfo)
          Called prior to assigning a specific region.
 void preBalance(ObserverContext<MasterCoprocessorEnvironment> ctx)
          Called prior to requesting rebalancing of the cluster regions, though after the initial checks for regions in transition and the balance switch flag.
 boolean preBalanceSwitch(ObserverContext<MasterCoprocessorEnvironment> ctx, boolean newValue)
          Called prior to modifying the flag used to enable/disable region balancing.
 void preCloneSnapshot(ObserverContext<MasterCoprocessorEnvironment> ctx, HBaseProtos.SnapshotDescription snapshot, HTableDescriptor hTableDescriptor)
          Called before a snapshot is cloned.
 void preCreateNamespace(ObserverContext<MasterCoprocessorEnvironment> ctx, NamespaceDescriptor ns)
          Called before a new namespace is created by HMaster.
 void preCreateTable(ObserverContext<MasterCoprocessorEnvironment> ctx, HTableDescriptor desc, HRegionInfo[] regions)
          Called before a new table is created by HMaster.
 void preCreateTableHandler(ObserverContext<MasterCoprocessorEnvironment> ctx, HTableDescriptor desc, HRegionInfo[] regions)
          Called before a new table is created by HMaster.
 void preDeleteColumn(ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName, byte[] c)
          Called prior to deleting the entire column family.
 void preDeleteColumnHandler(ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName, byte[] c)
          Called prior to deleting the entire column family.
 void preDeleteNamespace(ObserverContext<MasterCoprocessorEnvironment> ctx, String namespace)
          Called before HMaster deletes a namespace It can't bypass the default action, e.g., ctx.bypass() won't have effect.
 void preDeleteSnapshot(ObserverContext<MasterCoprocessorEnvironment> ctx, HBaseProtos.SnapshotDescription snapshot)
          Called before a snapshot is deleted.
 void preDeleteTable(ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName)
          Called before HMaster deletes a table.
 void preDeleteTableHandler(ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName)
          Called before HMaster deletes a table.
 void preDisableTable(ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName)
          Called prior to disabling a table.
 void preDisableTableHandler(ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName)
          Called prior to disabling a table.
 void preEnableTable(ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName)
          Called prior to enabling a table.
 void preEnableTableHandler(ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName)
          Called prior to enabling a table.
 void preGetTableDescriptors(ObserverContext<MasterCoprocessorEnvironment> ctx, List<TableName> tableNamesList, List<HTableDescriptor> descriptors)
          Called before a getTableDescriptors request has been processed.
 void preModifyColumn(ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName, HColumnDescriptor descriptor)
          Called prior to modifying a column family's attributes.
 void preModifyColumnHandler(ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName, HColumnDescriptor descriptor)
          Called prior to modifying a column family's attributes.
 void preModifyNamespace(ObserverContext<MasterCoprocessorEnvironment> ctx, NamespaceDescriptor ns)
          Called prior to modifying a namespace's properties.
 void preModifyTable(ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName, HTableDescriptor htd)
          Called prior to modifying a table's properties.
 void preModifyTableHandler(ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName, HTableDescriptor htd)
          Called prior to modifying a table's properties.
 void preMove(ObserverContext<MasterCoprocessorEnvironment> ctx, HRegionInfo region, ServerName srcServer, ServerName destServer)
          Called prior to moving a given region from one region server to another.
 void preRegionOffline(ObserverContext<MasterCoprocessorEnvironment> ctx, HRegionInfo regionInfo)
          Called prior to marking a given region as offline.
 void preRestoreSnapshot(ObserverContext<MasterCoprocessorEnvironment> ctx, HBaseProtos.SnapshotDescription snapshot, HTableDescriptor hTableDescriptor)
          Called before a snapshot is restored.
 void preShutdown(ObserverContext<MasterCoprocessorEnvironment> ctx)
          Called prior to shutting down the full HBase cluster, including this HMaster process.
 void preSnapshot(ObserverContext<MasterCoprocessorEnvironment> ctx, HBaseProtos.SnapshotDescription snapshot, HTableDescriptor hTableDescriptor)
          Called before a new snapshot is taken.
 void preStopMaster(ObserverContext<MasterCoprocessorEnvironment> ctx)
          Called immediately prior to stopping this HMaster process.
 void preUnassign(ObserverContext<MasterCoprocessorEnvironment> ctx, HRegionInfo regionInfo, boolean force)
          Called prior to unassigning a given region.
 
Methods inherited from interface org.apache.hadoop.hbase.Coprocessor
start, stop
 

Method Detail

preCreateTable

void preCreateTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
                    HTableDescriptor desc,
                    HRegionInfo[] regions)
                    throws IOException
Called before a new table is created by HMaster. Called as part of create table RPC call. It can't bypass the default action, e.g., ctx.bypass() won't have effect.

Parameters:
ctx - the environment to interact with the framework and master
desc - the HTableDescriptor for the table
regions - the initial regions created for the table
Throws:
IOException

postCreateTable

void postCreateTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
                     HTableDescriptor desc,
                     HRegionInfo[] regions)
                     throws IOException
Called after the createTable operation has been requested. Called as part of create table RPC call.

Parameters:
ctx - the environment to interact with the framework and master
desc - the HTableDescriptor for the table
regions - the initial regions created for the table
Throws:
IOException

preCreateTableHandler

void preCreateTableHandler(ObserverContext<MasterCoprocessorEnvironment> ctx,
                           HTableDescriptor desc,
                           HRegionInfo[] regions)
                           throws IOException
Called before a new table is created by HMaster. Called as part of create table handler and it is async to the create RPC call. It can't bypass the default action, e.g., ctx.bypass() won't have effect.

Parameters:
ctx - the environment to interact with the framework and master
desc - the HTableDescriptor for the table
regions - the initial regions created for the table
Throws:
IOException

postCreateTableHandler

void postCreateTableHandler(ObserverContext<MasterCoprocessorEnvironment> ctx,
                            HTableDescriptor desc,
                            HRegionInfo[] regions)
                            throws IOException
Called after the createTable operation has been requested. Called as part of create table RPC call. Called as part of create table handler and it is async to the create RPC call.

Parameters:
ctx - the environment to interact with the framework and master
desc - the HTableDescriptor for the table
regions - the initial regions created for the table
Throws:
IOException

preDeleteTable

void preDeleteTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
                    TableName tableName)
                    throws IOException
Called before HMaster deletes a table. Called as part of delete table RPC call. It can't bypass the default action, e.g., ctx.bypass() won't have effect.

Parameters:
ctx - the environment to interact with the framework and master
tableName - the name of the table
Throws:
IOException

postDeleteTable

void postDeleteTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
                     TableName tableName)
                     throws IOException
Called after the deleteTable operation has been requested. Called as part of delete table RPC call.

Parameters:
ctx - the environment to interact with the framework and master
tableName - the name of the table
Throws:
IOException

preDeleteTableHandler

void preDeleteTableHandler(ObserverContext<MasterCoprocessorEnvironment> ctx,
                           TableName tableName)
                           throws IOException
Called before HMaster deletes a table. Called as part of delete table handler and it is async to the delete RPC call. It can't bypass the default action, e.g., ctx.bypass() won't have effect.

Parameters:
ctx - the environment to interact with the framework and master
tableName - the name of the table
Throws:
IOException

postDeleteTableHandler

void postDeleteTableHandler(ObserverContext<MasterCoprocessorEnvironment> ctx,
                            TableName tableName)
                            throws IOException
Called after HMaster deletes a table. Called as part of delete table handler and it is async to the delete RPC call. It can't bypass the default action, e.g., ctx.bypass() won't have effect.

Parameters:
ctx - the environment to interact with the framework and master
tableName - the name of the table
Throws:
IOException

preModifyTable

void preModifyTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
                    TableName tableName,
                    HTableDescriptor htd)
                    throws IOException
Called prior to modifying a table's properties. Called as part of modify table RPC call. It can't bypass the default action, e.g., ctx.bypass() won't have effect.

Parameters:
ctx - the environment to interact with the framework and master
tableName - the name of the table
htd - the HTableDescriptor
Throws:
IOException

postModifyTable

void postModifyTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
                     TableName tableName,
                     HTableDescriptor htd)
                     throws IOException
Called after the modifyTable operation has been requested. Called as part of modify table RPC call.

Parameters:
ctx - the environment to interact with the framework and master
tableName - the name of the table
htd - the HTableDescriptor
Throws:
IOException

preModifyTableHandler

void preModifyTableHandler(ObserverContext<MasterCoprocessorEnvironment> ctx,
                           TableName tableName,
                           HTableDescriptor htd)
                           throws IOException
Called prior to modifying a table's properties. Called as part of modify table handler and it is async to the modify table RPC call. It can't bypass the default action, e.g., ctx.bypass() won't have effect.

Parameters:
ctx - the environment to interact with the framework and master
tableName - the name of the table
htd - the HTableDescriptor
Throws:
IOException

postModifyTableHandler

void postModifyTableHandler(ObserverContext<MasterCoprocessorEnvironment> ctx,
                            TableName tableName,
                            HTableDescriptor htd)
                            throws IOException
Called after to modifying a table's properties. Called as part of modify table handler and it is async to the modify table RPC call. It can't bypass the default action, e.g., ctx.bypass() won't have effect.

Parameters:
ctx - the environment to interact with the framework and master
tableName - the name of the table
htd - the HTableDescriptor
Throws:
IOException

preAddColumn

void preAddColumn(ObserverContext<MasterCoprocessorEnvironment> ctx,
                  TableName tableName,
                  HColumnDescriptor column)
                  throws IOException
Called prior to adding a new column family to the table. Called as part of add column RPC call.

Parameters:
ctx - the environment to interact with the framework and master
tableName - the name of the table
column - the HColumnDescriptor
Throws:
IOException

postAddColumn

void postAddColumn(ObserverContext<MasterCoprocessorEnvironment> ctx,
                   TableName tableName,
                   HColumnDescriptor column)
                   throws IOException
Called after the new column family has been created. Called as part of add column RPC call.

Parameters:
ctx - the environment to interact with the framework and master
tableName - the name of the table
column - the HColumnDescriptor
Throws:
IOException

preAddColumnHandler

void preAddColumnHandler(ObserverContext<MasterCoprocessorEnvironment> ctx,
                         TableName tableName,
                         HColumnDescriptor column)
                         throws IOException
Called prior to adding a new column family to the table. Called as part of add column handler.

Parameters:
ctx - the environment to interact with the framework and master
tableName - the name of the table
column - the HColumnDescriptor
Throws:
IOException

postAddColumnHandler

void postAddColumnHandler(ObserverContext<MasterCoprocessorEnvironment> ctx,
                          TableName tableName,
                          HColumnDescriptor column)
                          throws IOException
Called after the new column family has been created. Called as part of add column handler.

Parameters:
ctx - the environment to interact with the framework and master
tableName - the name of the table
column - the HColumnDescriptor
Throws:
IOException

preModifyColumn

void preModifyColumn(ObserverContext<MasterCoprocessorEnvironment> ctx,
                     TableName tableName,
                     HColumnDescriptor descriptor)
                     throws IOException
Called prior to modifying a column family's attributes. Called as part of modify column RPC call.

Parameters:
ctx - the environment to interact with the framework and master
tableName - the name of the table
descriptor - the HColumnDescriptor
Throws:
IOException

postModifyColumn

void postModifyColumn(ObserverContext<MasterCoprocessorEnvironment> ctx,
                      TableName tableName,
                      HColumnDescriptor descriptor)
                      throws IOException
Called after the column family has been updated. Called as part of modify column RPC call.

Parameters:
ctx - the environment to interact with the framework and master
tableName - the name of the table
descriptor - the HColumnDescriptor
Throws:
IOException

preModifyColumnHandler

void preModifyColumnHandler(ObserverContext<MasterCoprocessorEnvironment> ctx,
                            TableName tableName,
                            HColumnDescriptor descriptor)
                            throws IOException
Called prior to modifying a column family's attributes. Called as part of modify column handler.

Parameters:
ctx - the environment to interact with the framework and master
tableName - the name of the table
descriptor - the HColumnDescriptor
Throws:
IOException

postModifyColumnHandler

void postModifyColumnHandler(ObserverContext<MasterCoprocessorEnvironment> ctx,
                             TableName tableName,
                             HColumnDescriptor descriptor)
                             throws IOException
Called after the column family has been updated. Called as part of modify column handler.

Parameters:
ctx - the environment to interact with the framework and master
tableName - the name of the table
descriptor - the HColumnDescriptor
Throws:
IOException

preDeleteColumn

void preDeleteColumn(ObserverContext<MasterCoprocessorEnvironment> ctx,
                     TableName tableName,
                     byte[] c)
                     throws IOException
Called prior to deleting the entire column family. Called as part of delete column RPC call.

Parameters:
ctx - the environment to interact with the framework and master
tableName - the name of the table
c - the column
Throws:
IOException

postDeleteColumn

void postDeleteColumn(ObserverContext<MasterCoprocessorEnvironment> ctx,
                      TableName tableName,
                      byte[] c)
                      throws IOException
Called after the column family has been deleted. Called as part of delete column RPC call.

Parameters:
ctx - the environment to interact with the framework and master
tableName - the name of the table
c - the column
Throws:
IOException

preDeleteColumnHandler

void preDeleteColumnHandler(ObserverContext<MasterCoprocessorEnvironment> ctx,
                            TableName tableName,
                            byte[] c)
                            throws IOException
Called prior to deleting the entire column family. Called as part of delete column handler.

Parameters:
ctx - the environment to interact with the framework and master
tableName - the name of the table
c - the column
Throws:
IOException

postDeleteColumnHandler

void postDeleteColumnHandler(ObserverContext<MasterCoprocessorEnvironment> ctx,
                             TableName tableName,
                             byte[] c)
                             throws IOException
Called after the column family has been deleted. Called as part of delete column handler.

Parameters:
ctx - the environment to interact with the framework and master
tableName - the name of the table
c - the column
Throws:
IOException

preEnableTable

void preEnableTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
                    TableName tableName)
                    throws IOException
Called prior to enabling a table. Called as part of enable table RPC call. It can't bypass the default action, e.g., ctx.bypass() won't have effect.

Parameters:
ctx - the environment to interact with the framework and master
tableName - the name of the table
Throws:
IOException

postEnableTable

void postEnableTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
                     TableName tableName)
                     throws IOException
Called after the enableTable operation has been requested. Called as part of enable table RPC call.

Parameters:
ctx - the environment to interact with the framework and master
tableName - the name of the table
Throws:
IOException

preEnableTableHandler

void preEnableTableHandler(ObserverContext<MasterCoprocessorEnvironment> ctx,
                           TableName tableName)
                           throws IOException
Called prior to enabling a table. Called as part of enable table handler and it is async to the enable table RPC call. It can't bypass the default action, e.g., ctx.bypass() won't have effect.

Parameters:
ctx - the environment to interact with the framework and master
tableName - the name of the table
Throws:
IOException

postEnableTableHandler

void postEnableTableHandler(ObserverContext<MasterCoprocessorEnvironment> ctx,
                            TableName tableName)
                            throws IOException
Called after the enableTable operation has been requested. Called as part of enable table handler and it is async to the enable table RPC call.

Parameters:
ctx - the environment to interact with the framework and master
tableName - the name of the table
Throws:
IOException

preDisableTable

void preDisableTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
                     TableName tableName)
                     throws IOException
Called prior to disabling a table. Called as part of disable table RPC call. It can't bypass the default action, e.g., ctx.bypass() won't have effect.

Parameters:
ctx - the environment to interact with the framework and master
tableName - the name of the table
Throws:
IOException

postDisableTable

void postDisableTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
                      TableName tableName)
                      throws IOException
Called after the disableTable operation has been requested. Called as part of disable table RPC call.

Parameters:
ctx - the environment to interact with the framework and master
tableName - the name of the table
Throws:
IOException

preDisableTableHandler

void preDisableTableHandler(ObserverContext<MasterCoprocessorEnvironment> ctx,
                            TableName tableName)
                            throws IOException
Called prior to disabling a table. Called as part of disable table handler and it is asyn to the disable table RPC call. It can't bypass the default action, e.g., ctx.bypass() won't have effect.

Parameters:
ctx - the environment to interact with the framework and master
tableName - the name of the table
Throws:
IOException

postDisableTableHandler

void postDisableTableHandler(ObserverContext<MasterCoprocessorEnvironment> ctx,
                             TableName tableName)
                             throws IOException
Called after the disableTable operation has been requested. Called as part of disable table handler and it is asyn to the disable table RPC call.

Parameters:
ctx - the environment to interact with the framework and master
tableName - the name of the table
Throws:
IOException

preMove

void preMove(ObserverContext<MasterCoprocessorEnvironment> ctx,
             HRegionInfo region,
             ServerName srcServer,
             ServerName destServer)
             throws IOException
Called prior to moving a given region from one region server to another.

Parameters:
ctx - the environment to interact with the framework and master
region - the HRegionInfo
srcServer - the source ServerName
destServer - the destination ServerName
Throws:
IOException

postMove

void postMove(ObserverContext<MasterCoprocessorEnvironment> ctx,
              HRegionInfo region,
              ServerName srcServer,
              ServerName destServer)
              throws IOException
Called after the region move has been requested.

Parameters:
ctx - the environment to interact with the framework and master
region - the HRegionInfo
srcServer - the source ServerName
destServer - the destination ServerName
Throws:
IOException

preAssign

void preAssign(ObserverContext<MasterCoprocessorEnvironment> ctx,
               HRegionInfo regionInfo)
               throws IOException
Called prior to assigning a specific region.

Parameters:
ctx - the environment to interact with the framework and master
regionInfo - the regionInfo of the region
Throws:
IOException

postAssign

void postAssign(ObserverContext<MasterCoprocessorEnvironment> ctx,
                HRegionInfo regionInfo)
                throws IOException
Called after the region assignment has been requested.

Parameters:
ctx - the environment to interact with the framework and master
regionInfo - the regionInfo of the region
Throws:
IOException

preUnassign

void preUnassign(ObserverContext<MasterCoprocessorEnvironment> ctx,
                 HRegionInfo regionInfo,
                 boolean force)
                 throws IOException
Called prior to unassigning a given region.

Parameters:
ctx - the environment to interact with the framework and master
regionInfo -
force - whether to force unassignment or not
Throws:
IOException

postUnassign

void postUnassign(ObserverContext<MasterCoprocessorEnvironment> ctx,
                  HRegionInfo regionInfo,
                  boolean force)
                  throws IOException
Called after the region unassignment has been requested.

Parameters:
ctx - the environment to interact with the framework and master
regionInfo -
force - whether to force unassignment or not
Throws:
IOException

preRegionOffline

void preRegionOffline(ObserverContext<MasterCoprocessorEnvironment> ctx,
                      HRegionInfo regionInfo)
                      throws IOException
Called prior to marking a given region as offline. ctx.bypass() will not have any impact on this hook.

Parameters:
ctx - the environment to interact with the framework and master
regionInfo -
Throws:
IOException

postRegionOffline

void postRegionOffline(ObserverContext<MasterCoprocessorEnvironment> ctx,
                       HRegionInfo regionInfo)
                       throws IOException
Called after the region has been marked offline.

Parameters:
ctx - the environment to interact with the framework and master
regionInfo -
Throws:
IOException

preBalance

void preBalance(ObserverContext<MasterCoprocessorEnvironment> ctx)
                throws IOException
Called prior to requesting rebalancing of the cluster regions, though after the initial checks for regions in transition and the balance switch flag.

Parameters:
ctx - the environment to interact with the framework and master
Throws:
IOException

postBalance

void postBalance(ObserverContext<MasterCoprocessorEnvironment> ctx,
                 List<RegionPlan> plans)
                 throws IOException
Called after the balancing plan has been submitted.

Parameters:
ctx - the environment to interact with the framework and master
plans - the RegionPlans which master has executed. RegionPlan serves as hint as for the final destination for the underlying region but may not represent the final state of assignment
Throws:
IOException

preBalanceSwitch

boolean preBalanceSwitch(ObserverContext<MasterCoprocessorEnvironment> ctx,
                         boolean newValue)
                         throws IOException
Called prior to modifying the flag used to enable/disable region balancing.

Parameters:
ctx - the coprocessor instance's environment
newValue - the new flag value submitted in the call
Throws:
IOException

postBalanceSwitch

void postBalanceSwitch(ObserverContext<MasterCoprocessorEnvironment> ctx,
                       boolean oldValue,
                       boolean newValue)
                       throws IOException
Called after the flag to enable/disable balancing has changed.

Parameters:
ctx - the coprocessor instance's environment
oldValue - the previously set balanceSwitch value
newValue - the newly set balanceSwitch value
Throws:
IOException

preShutdown

void preShutdown(ObserverContext<MasterCoprocessorEnvironment> ctx)
                 throws IOException
Called prior to shutting down the full HBase cluster, including this HMaster process.

Throws:
IOException

preStopMaster

void preStopMaster(ObserverContext<MasterCoprocessorEnvironment> ctx)
                   throws IOException
Called immediately prior to stopping this HMaster process.

Throws:
IOException

postStartMaster

void postStartMaster(ObserverContext<MasterCoprocessorEnvironment> ctx)
                     throws IOException
Called immediately after an active master instance has completed initialization. Will not be called on standby master instances unless they take over the active role.

Throws:
IOException

preSnapshot

void preSnapshot(ObserverContext<MasterCoprocessorEnvironment> ctx,
                 HBaseProtos.SnapshotDescription snapshot,
                 HTableDescriptor hTableDescriptor)
                 throws IOException
Called before a new snapshot is taken. Called as part of snapshot RPC call. It can't bypass the default action, e.g., ctx.bypass() won't have effect.

Parameters:
ctx - the environment to interact with the framework and master
snapshot - the SnapshotDescriptor for the snapshot
hTableDescriptor - the hTableDescriptor of the table to snapshot
Throws:
IOException

postSnapshot

void postSnapshot(ObserverContext<MasterCoprocessorEnvironment> ctx,
                  HBaseProtos.SnapshotDescription snapshot,
                  HTableDescriptor hTableDescriptor)
                  throws IOException
Called after the snapshot operation has been requested. Called as part of snapshot RPC call.

Parameters:
ctx - the environment to interact with the framework and master
snapshot - the SnapshotDescriptor for the snapshot
hTableDescriptor - the hTableDescriptor of the table to snapshot
Throws:
IOException

preCloneSnapshot

void preCloneSnapshot(ObserverContext<MasterCoprocessorEnvironment> ctx,
                      HBaseProtos.SnapshotDescription snapshot,
                      HTableDescriptor hTableDescriptor)
                      throws IOException
Called before a snapshot is cloned. Called as part of restoreSnapshot RPC call. It can't bypass the default action, e.g., ctx.bypass() won't have effect.

Parameters:
ctx - the environment to interact with the framework and master
snapshot - the SnapshotDescriptor for the snapshot
hTableDescriptor - the hTableDescriptor of the table to create
Throws:
IOException

postCloneSnapshot

void postCloneSnapshot(ObserverContext<MasterCoprocessorEnvironment> ctx,
                       HBaseProtos.SnapshotDescription snapshot,
                       HTableDescriptor hTableDescriptor)
                       throws IOException
Called after a snapshot clone operation has been requested. Called as part of restoreSnapshot RPC call.

Parameters:
ctx - the environment to interact with the framework and master
snapshot - the SnapshotDescriptor for the snapshot
hTableDescriptor - the hTableDescriptor of the table to create
Throws:
IOException

preRestoreSnapshot

void preRestoreSnapshot(ObserverContext<MasterCoprocessorEnvironment> ctx,
                        HBaseProtos.SnapshotDescription snapshot,
                        HTableDescriptor hTableDescriptor)
                        throws IOException
Called before a snapshot is restored. Called as part of restoreSnapshot RPC call. It can't bypass the default action, e.g., ctx.bypass() won't have effect.

Parameters:
ctx - the environment to interact with the framework and master
snapshot - the SnapshotDescriptor for the snapshot
hTableDescriptor - the hTableDescriptor of the table to restore
Throws:
IOException

postRestoreSnapshot

void postRestoreSnapshot(ObserverContext<MasterCoprocessorEnvironment> ctx,
                         HBaseProtos.SnapshotDescription snapshot,
                         HTableDescriptor hTableDescriptor)
                         throws IOException
Called after a snapshot restore operation has been requested. Called as part of restoreSnapshot RPC call.

Parameters:
ctx - the environment to interact with the framework and master
snapshot - the SnapshotDescriptor for the snapshot
hTableDescriptor - the hTableDescriptor of the table to restore
Throws:
IOException

preDeleteSnapshot

void preDeleteSnapshot(ObserverContext<MasterCoprocessorEnvironment> ctx,
                       HBaseProtos.SnapshotDescription snapshot)
                       throws IOException
Called before a snapshot is deleted. Called as part of deleteSnapshot RPC call. It can't bypass the default action, e.g., ctx.bypass() won't have effect.

Parameters:
ctx - the environment to interact with the framework and master
snapshot - the SnapshotDescriptor of the snapshot to delete
Throws:
IOException

postDeleteSnapshot

void postDeleteSnapshot(ObserverContext<MasterCoprocessorEnvironment> ctx,
                        HBaseProtos.SnapshotDescription snapshot)
                        throws IOException
Called after the delete snapshot operation has been requested. Called as part of deleteSnapshot RPC call.

Parameters:
ctx - the environment to interact with the framework and master
snapshot - the SnapshotDescriptor of the snapshot to delete
Throws:
IOException

preGetTableDescriptors

void preGetTableDescriptors(ObserverContext<MasterCoprocessorEnvironment> ctx,
                            List<TableName> tableNamesList,
                            List<HTableDescriptor> descriptors)
                            throws IOException
Called before a getTableDescriptors request has been processed.

Parameters:
ctx - the environment to interact with the framework and master
tableNamesList - the list of table names, or null if querying for all
descriptors - an empty list, can be filled with what to return if bypassing
Throws:
IOException

postGetTableDescriptors

void postGetTableDescriptors(ObserverContext<MasterCoprocessorEnvironment> ctx,
                             List<HTableDescriptor> descriptors)
                             throws IOException
Called after a getTableDescriptors request has been processed.

Parameters:
ctx - the environment to interact with the framework and master
descriptors - the list of descriptors about to be returned
Throws:
IOException

preCreateNamespace

void preCreateNamespace(ObserverContext<MasterCoprocessorEnvironment> ctx,
                        NamespaceDescriptor ns)
                        throws IOException
Called before a new namespace is created by HMaster. It can't bypass the default action, e.g., ctx.bypass() won't have effect.

Parameters:
ctx - the environment to interact with the framework and master
ns - the NamespaceDescriptor for the table
Throws:
IOException

postCreateNamespace

void postCreateNamespace(ObserverContext<MasterCoprocessorEnvironment> ctx,
                         NamespaceDescriptor ns)
                         throws IOException
Called after the createNamespace operation has been requested.

Parameters:
ctx - the environment to interact with the framework and master
ns - the NamespaceDescriptor for the table
Throws:
IOException

preDeleteNamespace

void preDeleteNamespace(ObserverContext<MasterCoprocessorEnvironment> ctx,
                        String namespace)
                        throws IOException
Called before HMaster deletes a namespace It can't bypass the default action, e.g., ctx.bypass() won't have effect.

Parameters:
ctx - the environment to interact with the framework and master
namespace - the name of the namespace
Throws:
IOException

postDeleteNamespace

void postDeleteNamespace(ObserverContext<MasterCoprocessorEnvironment> ctx,
                         String namespace)
                         throws IOException
Called after the deleteNamespace operation has been requested.

Parameters:
ctx - the environment to interact with the framework and master
namespace - the name of the namespace
Throws:
IOException

preModifyNamespace

void preModifyNamespace(ObserverContext<MasterCoprocessorEnvironment> ctx,
                        NamespaceDescriptor ns)
                        throws IOException
Called prior to modifying a namespace's properties. It can't bypass the default action, e.g., ctx.bypass() won't have effect.

Parameters:
ctx - the environment to interact with the framework and master
ns - the NamespaceDescriptor
Throws:
IOException

postModifyNamespace

void postModifyNamespace(ObserverContext<MasterCoprocessorEnvironment> ctx,
                         NamespaceDescriptor ns)
                         throws IOException
Called after the modifyNamespace operation has been requested.

Parameters:
ctx - the environment to interact with the framework and master
ns - the NamespaceDescriptor
Throws:
IOException


Copyright © 2013 The Apache Software Foundation. All Rights Reserved.