org.apache.hadoop.hbase.coprocessor
Class BaseMasterObserver

java.lang.Object
  extended by org.apache.hadoop.hbase.coprocessor.BaseMasterObserver
All Implemented Interfaces:
Coprocessor, MasterObserver

@InterfaceAudience.LimitedPrivate(value={"Coprocesssor","Configuration"})
@InterfaceStability.Evolving
public class BaseMasterObserver
extends Object
implements MasterObserver


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
 
Constructor Summary
BaseMasterObserver()
           
 
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 postGetNamespaceDescriptor(ObserverContext<MasterCoprocessorEnvironment> ctx, NamespaceDescriptor ns)
          Called after a getNamespaceDescriptor request has been processed.
 void postGetTableDescriptors(ObserverContext<MasterCoprocessorEnvironment> ctx, List<HTableDescriptor> descriptors)
          Called after a getTableDescriptors request has been processed.
 void postListNamespaceDescriptors(ObserverContext<MasterCoprocessorEnvironment> ctx, List<NamespaceDescriptor> descriptors)
          Called after a listNamespaceDescriptors 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 postTruncateTable(ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName)
          Called after the truncateTable operation has been requested.
 void postTruncateTableHandler(ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName)
          Called after HMaster truncates a table.
 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 b)
          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 preGetNamespaceDescriptor(ObserverContext<MasterCoprocessorEnvironment> ctx, String namespace)
          Called before a getNamespaceDescriptor request has been processed.
 void preGetTableDescriptors(ObserverContext<MasterCoprocessorEnvironment> ctx, List<TableName> tableNamesList, List<HTableDescriptor> descriptors)
          Called before a getTableDescriptors request has been processed.
 void preListNamespaceDescriptors(ObserverContext<MasterCoprocessorEnvironment> ctx, List<NamespaceDescriptor> descriptors)
          Called before a listNamespaceDescriptors request has been processed.
 void preMasterInitialization(ObserverContext<MasterCoprocessorEnvironment> ctx)
          Call before the master initialization is set to true.
 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 preTruncateTable(ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName)
          Called before HMaster truncates a table.
 void preTruncateTableHandler(ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName)
          Called before HMaster truncates a table.
 void preUnassign(ObserverContext<MasterCoprocessorEnvironment> ctx, HRegionInfo regionInfo, boolean force)
          Called prior to unassigning a given region.
 void start(CoprocessorEnvironment ctx)
           
 void stop(CoprocessorEnvironment ctx)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BaseMasterObserver

public BaseMasterObserver()
Method Detail

preCreateTable

public void preCreateTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
                           HTableDescriptor desc,
                           HRegionInfo[] regions)
                    throws IOException
Description copied from interface: MasterObserver
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.

Specified by:
preCreateTable in interface MasterObserver
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

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

Specified by:
postCreateTable in interface MasterObserver
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

public void preCreateTableHandler(ObserverContext<MasterCoprocessorEnvironment> ctx,
                                  HTableDescriptor desc,
                                  HRegionInfo[] regions)
                           throws IOException
Description copied from interface: MasterObserver
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.

Specified by:
preCreateTableHandler in interface MasterObserver
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

public void postCreateTableHandler(ObserverContext<MasterCoprocessorEnvironment> ctx,
                                   HTableDescriptor desc,
                                   HRegionInfo[] regions)
                            throws IOException
Description copied from interface: MasterObserver
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.

Specified by:
postCreateTableHandler in interface MasterObserver
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

public void preDeleteTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
                           TableName tableName)
                    throws IOException
Description copied from interface: MasterObserver
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.

Specified by:
preDeleteTable in interface MasterObserver
Parameters:
ctx - the environment to interact with the framework and master
tableName - the name of the table
Throws:
IOException

postDeleteTable

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

Specified by:
postDeleteTable in interface MasterObserver
Parameters:
ctx - the environment to interact with the framework and master
tableName - the name of the table
Throws:
IOException

preDeleteTableHandler

public void preDeleteTableHandler(ObserverContext<MasterCoprocessorEnvironment> ctx,
                                  TableName tableName)
                           throws IOException
Description copied from interface: MasterObserver
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.

Specified by:
preDeleteTableHandler in interface MasterObserver
Parameters:
ctx - the environment to interact with the framework and master
tableName - the name of the table
Throws:
IOException

postDeleteTableHandler

public void postDeleteTableHandler(ObserverContext<MasterCoprocessorEnvironment> ctx,
                                   TableName tableName)
                            throws IOException
Description copied from interface: MasterObserver
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.

Specified by:
postDeleteTableHandler in interface MasterObserver
Parameters:
ctx - the environment to interact with the framework and master
tableName - the name of the table
Throws:
IOException

preTruncateTable

public void preTruncateTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
                             TableName tableName)
                      throws IOException
Description copied from interface: MasterObserver
Called before HMaster truncates a table. Called as part of truncate table RPC call. It can't bypass the default action, e.g., ctx.bypass() won't have effect.

Specified by:
preTruncateTable in interface MasterObserver
Parameters:
ctx - the environment to interact with the framework and master
tableName - the name of the table
Throws:
IOException

postTruncateTable

public void postTruncateTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
                              TableName tableName)
                       throws IOException
Description copied from interface: MasterObserver
Called after the truncateTable operation has been requested. Called as part of truncate table RPC call. The truncate is synchronous, so this method will be called when the truncate operation is terminated.

Specified by:
postTruncateTable in interface MasterObserver
Parameters:
ctx - the environment to interact with the framework and master
tableName - the name of the table
Throws:
IOException

preTruncateTableHandler

public void preTruncateTableHandler(ObserverContext<MasterCoprocessorEnvironment> ctx,
                                    TableName tableName)
                             throws IOException
Description copied from interface: MasterObserver
Called before HMaster truncates a table. Called as part of truncate table handler and it is sync to the truncate RPC call. It can't bypass the default action, e.g., ctx.bypass() won't have effect.

Specified by:
preTruncateTableHandler in interface MasterObserver
Parameters:
ctx - the environment to interact with the framework and master
tableName - the name of the table
Throws:
IOException

postTruncateTableHandler

public void postTruncateTableHandler(ObserverContext<MasterCoprocessorEnvironment> ctx,
                                     TableName tableName)
                              throws IOException
Description copied from interface: MasterObserver
Called after HMaster truncates a table. Called as part of truncate table handler and it is sync to the truncate RPC call. It can't bypass the default action, e.g., ctx.bypass() won't have effect.

Specified by:
postTruncateTableHandler in interface MasterObserver
Parameters:
ctx - the environment to interact with the framework and master
tableName - the name of the table
Throws:
IOException

preModifyTable

public void preModifyTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
                           TableName tableName,
                           HTableDescriptor htd)
                    throws IOException
Description copied from interface: MasterObserver
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.

Specified by:
preModifyTable in interface MasterObserver
Parameters:
ctx - the environment to interact with the framework and master
tableName - the name of the table
htd - the HTableDescriptor
Throws:
IOException

postModifyTableHandler

public void postModifyTableHandler(ObserverContext<MasterCoprocessorEnvironment> ctx,
                                   TableName tableName,
                                   HTableDescriptor htd)
                            throws IOException
Description copied from interface: MasterObserver
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.

Specified by:
postModifyTableHandler in interface MasterObserver
Parameters:
ctx - the environment to interact with the framework and master
tableName - the name of the table
htd - the HTableDescriptor
Throws:
IOException

preModifyTableHandler

public void preModifyTableHandler(ObserverContext<MasterCoprocessorEnvironment> ctx,
                                  TableName tableName,
                                  HTableDescriptor htd)
                           throws IOException
Description copied from interface: MasterObserver
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.

Specified by:
preModifyTableHandler in interface MasterObserver
Parameters:
ctx - the environment to interact with the framework and master
tableName - the name of the table
htd - the HTableDescriptor
Throws:
IOException

postModifyTable

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

Specified by:
postModifyTable in interface MasterObserver
Parameters:
ctx - the environment to interact with the framework and master
tableName - the name of the table
htd - the HTableDescriptor
Throws:
IOException

preCreateNamespace

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

Specified by:
preCreateNamespace in interface MasterObserver
Parameters:
ctx - the environment to interact with the framework and master
ns - the NamespaceDescriptor for the table
Throws:
IOException

postCreateNamespace

public void postCreateNamespace(ObserverContext<MasterCoprocessorEnvironment> ctx,
                                NamespaceDescriptor ns)
                         throws IOException
Description copied from interface: MasterObserver
Called after the createNamespace operation has been requested.

Specified by:
postCreateNamespace in interface MasterObserver
Parameters:
ctx - the environment to interact with the framework and master
ns - the NamespaceDescriptor for the table
Throws:
IOException

preDeleteNamespace

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

Specified by:
preDeleteNamespace in interface MasterObserver
Parameters:
ctx - the environment to interact with the framework and master
namespace - the name of the namespace
Throws:
IOException

postDeleteNamespace

public void postDeleteNamespace(ObserverContext<MasterCoprocessorEnvironment> ctx,
                                String namespace)
                         throws IOException
Description copied from interface: MasterObserver
Called after the deleteNamespace operation has been requested.

Specified by:
postDeleteNamespace in interface MasterObserver
Parameters:
ctx - the environment to interact with the framework and master
namespace - the name of the namespace
Throws:
IOException

preModifyNamespace

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

Specified by:
preModifyNamespace in interface MasterObserver
Parameters:
ctx - the environment to interact with the framework and master
ns - the NamespaceDescriptor
Throws:
IOException

postModifyNamespace

public void postModifyNamespace(ObserverContext<MasterCoprocessorEnvironment> ctx,
                                NamespaceDescriptor ns)
                         throws IOException
Description copied from interface: MasterObserver
Called after the modifyNamespace operation has been requested.

Specified by:
postModifyNamespace in interface MasterObserver
Parameters:
ctx - the environment to interact with the framework and master
ns - the NamespaceDescriptor
Throws:
IOException

preGetNamespaceDescriptor

public void preGetNamespaceDescriptor(ObserverContext<MasterCoprocessorEnvironment> ctx,
                                      String namespace)
                               throws IOException
Description copied from interface: MasterObserver
Called before a getNamespaceDescriptor request has been processed.

Specified by:
preGetNamespaceDescriptor in interface MasterObserver
Parameters:
ctx - the environment to interact with the framework and master
namespace - the name of the namespace
Throws:
IOException

postGetNamespaceDescriptor

public void postGetNamespaceDescriptor(ObserverContext<MasterCoprocessorEnvironment> ctx,
                                       NamespaceDescriptor ns)
                                throws IOException
Description copied from interface: MasterObserver
Called after a getNamespaceDescriptor request has been processed.

Specified by:
postGetNamespaceDescriptor in interface MasterObserver
Parameters:
ctx - the environment to interact with the framework and master
ns - the NamespaceDescriptor
Throws:
IOException

preListNamespaceDescriptors

public void preListNamespaceDescriptors(ObserverContext<MasterCoprocessorEnvironment> ctx,
                                        List<NamespaceDescriptor> descriptors)
                                 throws IOException
Description copied from interface: MasterObserver
Called before a listNamespaceDescriptors request has been processed.

Specified by:
preListNamespaceDescriptors in interface MasterObserver
Parameters:
ctx - the environment to interact with the framework and master
descriptors - an empty list, can be filled with what to return if bypassing
Throws:
IOException

postListNamespaceDescriptors

public void postListNamespaceDescriptors(ObserverContext<MasterCoprocessorEnvironment> ctx,
                                         List<NamespaceDescriptor> descriptors)
                                  throws IOException
Description copied from interface: MasterObserver
Called after a listNamespaceDescriptors request has been processed.

Specified by:
postListNamespaceDescriptors in interface MasterObserver
Parameters:
ctx - the environment to interact with the framework and master
descriptors - the list of descriptors about to be returned
Throws:
IOException

preAddColumn

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

Specified by:
preAddColumn in interface MasterObserver
Parameters:
ctx - the environment to interact with the framework and master
tableName - the name of the table
column - the HColumnDescriptor
Throws:
IOException

postAddColumn

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

Specified by:
postAddColumn in interface MasterObserver
Parameters:
ctx - the environment to interact with the framework and master
tableName - the name of the table
column - the HColumnDescriptor
Throws:
IOException

preAddColumnHandler

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

Specified by:
preAddColumnHandler in interface MasterObserver
Parameters:
ctx - the environment to interact with the framework and master
tableName - the name of the table
column - the HColumnDescriptor
Throws:
IOException

postAddColumnHandler

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

Specified by:
postAddColumnHandler in interface MasterObserver
Parameters:
ctx - the environment to interact with the framework and master
tableName - the name of the table
column - the HColumnDescriptor
Throws:
IOException

preModifyColumn

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

Specified by:
preModifyColumn in interface MasterObserver
Parameters:
ctx - the environment to interact with the framework and master
tableName - the name of the table
descriptor - the HColumnDescriptor
Throws:
IOException

postModifyColumn

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

Specified by:
postModifyColumn in interface MasterObserver
Parameters:
ctx - the environment to interact with the framework and master
tableName - the name of the table
descriptor - the HColumnDescriptor
Throws:
IOException

preModifyColumnHandler

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

Specified by:
preModifyColumnHandler in interface MasterObserver
Parameters:
ctx - the environment to interact with the framework and master
tableName - the name of the table
descriptor - the HColumnDescriptor
Throws:
IOException

postModifyColumnHandler

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

Specified by:
postModifyColumnHandler in interface MasterObserver
Parameters:
ctx - the environment to interact with the framework and master
tableName - the name of the table
descriptor - the HColumnDescriptor
Throws:
IOException

preDeleteColumn

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

Specified by:
preDeleteColumn in interface MasterObserver
Parameters:
ctx - the environment to interact with the framework and master
tableName - the name of the table
c - the column
Throws:
IOException

postDeleteColumn

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

Specified by:
postDeleteColumn in interface MasterObserver
Parameters:
ctx - the environment to interact with the framework and master
tableName - the name of the table
c - the column
Throws:
IOException

preDeleteColumnHandler

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

Specified by:
preDeleteColumnHandler in interface MasterObserver
Parameters:
ctx - the environment to interact with the framework and master
tableName - the name of the table
c - the column
Throws:
IOException

postDeleteColumnHandler

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

Specified by:
postDeleteColumnHandler in interface MasterObserver
Parameters:
ctx - the environment to interact with the framework and master
tableName - the name of the table
c - the column
Throws:
IOException

preEnableTable

public void preEnableTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
                           TableName tableName)
                    throws IOException
Description copied from interface: MasterObserver
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.

Specified by:
preEnableTable in interface MasterObserver
Parameters:
ctx - the environment to interact with the framework and master
tableName - the name of the table
Throws:
IOException

postEnableTable

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

Specified by:
postEnableTable in interface MasterObserver
Parameters:
ctx - the environment to interact with the framework and master
tableName - the name of the table
Throws:
IOException

preEnableTableHandler

public void preEnableTableHandler(ObserverContext<MasterCoprocessorEnvironment> ctx,
                                  TableName tableName)
                           throws IOException
Description copied from interface: MasterObserver
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.

Specified by:
preEnableTableHandler in interface MasterObserver
Parameters:
ctx - the environment to interact with the framework and master
tableName - the name of the table
Throws:
IOException

postEnableTableHandler

public void postEnableTableHandler(ObserverContext<MasterCoprocessorEnvironment> ctx,
                                   TableName tableName)
                            throws IOException
Description copied from interface: MasterObserver
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.

Specified by:
postEnableTableHandler in interface MasterObserver
Parameters:
ctx - the environment to interact with the framework and master
tableName - the name of the table
Throws:
IOException

preDisableTable

public void preDisableTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
                            TableName tableName)
                     throws IOException
Description copied from interface: MasterObserver
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.

Specified by:
preDisableTable in interface MasterObserver
Parameters:
ctx - the environment to interact with the framework and master
tableName - the name of the table
Throws:
IOException

postDisableTable

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

Specified by:
postDisableTable in interface MasterObserver
Parameters:
ctx - the environment to interact with the framework and master
tableName - the name of the table
Throws:
IOException

preDisableTableHandler

public void preDisableTableHandler(ObserverContext<MasterCoprocessorEnvironment> ctx,
                                   TableName tableName)
                            throws IOException
Description copied from interface: MasterObserver
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.

Specified by:
preDisableTableHandler in interface MasterObserver
Parameters:
ctx - the environment to interact with the framework and master
tableName - the name of the table
Throws:
IOException

postDisableTableHandler

public void postDisableTableHandler(ObserverContext<MasterCoprocessorEnvironment> ctx,
                                    TableName tableName)
                             throws IOException
Description copied from interface: MasterObserver
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.

Specified by:
postDisableTableHandler in interface MasterObserver
Parameters:
ctx - the environment to interact with the framework and master
tableName - the name of the table
Throws:
IOException

preAssign

public void preAssign(ObserverContext<MasterCoprocessorEnvironment> ctx,
                      HRegionInfo regionInfo)
               throws IOException
Description copied from interface: MasterObserver
Called prior to assigning a specific region.

Specified by:
preAssign in interface MasterObserver
Parameters:
ctx - the environment to interact with the framework and master
regionInfo - the regionInfo of the region
Throws:
IOException

postAssign

public void postAssign(ObserverContext<MasterCoprocessorEnvironment> ctx,
                       HRegionInfo regionInfo)
                throws IOException
Description copied from interface: MasterObserver
Called after the region assignment has been requested.

Specified by:
postAssign in interface MasterObserver
Parameters:
ctx - the environment to interact with the framework and master
regionInfo - the regionInfo of the region
Throws:
IOException

preUnassign

public void preUnassign(ObserverContext<MasterCoprocessorEnvironment> ctx,
                        HRegionInfo regionInfo,
                        boolean force)
                 throws IOException
Description copied from interface: MasterObserver
Called prior to unassigning a given region.

Specified by:
preUnassign in interface MasterObserver
Parameters:
ctx - the environment to interact with the framework and master
force - whether to force unassignment or not
Throws:
IOException

postUnassign

public void postUnassign(ObserverContext<MasterCoprocessorEnvironment> ctx,
                         HRegionInfo regionInfo,
                         boolean force)
                  throws IOException
Description copied from interface: MasterObserver
Called after the region unassignment has been requested.

Specified by:
postUnassign in interface MasterObserver
Parameters:
ctx - the environment to interact with the framework and master
force - whether to force unassignment or not
Throws:
IOException

preRegionOffline

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

Specified by:
preRegionOffline in interface MasterObserver
Parameters:
ctx - the environment to interact with the framework and master
Throws:
IOException

postRegionOffline

public void postRegionOffline(ObserverContext<MasterCoprocessorEnvironment> ctx,
                              HRegionInfo regionInfo)
                       throws IOException
Description copied from interface: MasterObserver
Called after the region has been marked offline.

Specified by:
postRegionOffline in interface MasterObserver
Parameters:
ctx - the environment to interact with the framework and master
Throws:
IOException

preBalance

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

Specified by:
preBalance in interface MasterObserver
Parameters:
ctx - the environment to interact with the framework and master
Throws:
IOException

postBalance

public void postBalance(ObserverContext<MasterCoprocessorEnvironment> ctx,
                        List<RegionPlan> plans)
                 throws IOException
Description copied from interface: MasterObserver
Called after the balancing plan has been submitted.

Specified by:
postBalance in interface MasterObserver
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

public boolean preBalanceSwitch(ObserverContext<MasterCoprocessorEnvironment> ctx,
                                boolean b)
                         throws IOException
Description copied from interface: MasterObserver
Called prior to modifying the flag used to enable/disable region balancing.

Specified by:
preBalanceSwitch in interface MasterObserver
Parameters:
ctx - the coprocessor instance's environment
b - the new flag value submitted in the call
Throws:
IOException

postBalanceSwitch

public void postBalanceSwitch(ObserverContext<MasterCoprocessorEnvironment> ctx,
                              boolean oldValue,
                              boolean newValue)
                       throws IOException
Description copied from interface: MasterObserver
Called after the flag to enable/disable balancing has changed.

Specified by:
postBalanceSwitch in interface MasterObserver
Parameters:
ctx - the coprocessor instance's environment
oldValue - the previously set balanceSwitch value
newValue - the newly set balanceSwitch value
Throws:
IOException

preShutdown

public void preShutdown(ObserverContext<MasterCoprocessorEnvironment> ctx)
                 throws IOException
Description copied from interface: MasterObserver
Called prior to shutting down the full HBase cluster, including this HMaster process.

Specified by:
preShutdown in interface MasterObserver
Throws:
IOException

preStopMaster

public void preStopMaster(ObserverContext<MasterCoprocessorEnvironment> ctx)
                   throws IOException
Description copied from interface: MasterObserver
Called immediately prior to stopping this HMaster process.

Specified by:
preStopMaster in interface MasterObserver
Throws:
IOException

postStartMaster

public void postStartMaster(ObserverContext<MasterCoprocessorEnvironment> ctx)
                     throws IOException
Description copied from interface: MasterObserver
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.

Specified by:
postStartMaster in interface MasterObserver
Throws:
IOException

preMasterInitialization

public void preMasterInitialization(ObserverContext<MasterCoprocessorEnvironment> ctx)
                             throws IOException
Description copied from interface: MasterObserver
Call before the master initialization is set to true. HMaster process.

Specified by:
preMasterInitialization in interface MasterObserver
Throws:
IOException

start

public void start(CoprocessorEnvironment ctx)
           throws IOException
Specified by:
start in interface Coprocessor
Throws:
IOException

stop

public void stop(CoprocessorEnvironment ctx)
          throws IOException
Specified by:
stop in interface Coprocessor
Throws:
IOException

preMove

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

Specified by:
preMove in interface MasterObserver
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

public void postMove(ObserverContext<MasterCoprocessorEnvironment> ctx,
                     HRegionInfo region,
                     ServerName srcServer,
                     ServerName destServer)
              throws IOException
Description copied from interface: MasterObserver
Called after the region move has been requested.

Specified by:
postMove in interface MasterObserver
Parameters:
ctx - the environment to interact with the framework and master
region - the HRegionInfo
srcServer - the source ServerName
destServer - the destination ServerName
Throws:
IOException

preSnapshot

public void preSnapshot(ObserverContext<MasterCoprocessorEnvironment> ctx,
                        HBaseProtos.SnapshotDescription snapshot,
                        HTableDescriptor hTableDescriptor)
                 throws IOException
Description copied from interface: MasterObserver
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.

Specified by:
preSnapshot in interface MasterObserver
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

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

Specified by:
postSnapshot in interface MasterObserver
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

public void preCloneSnapshot(ObserverContext<MasterCoprocessorEnvironment> ctx,
                             HBaseProtos.SnapshotDescription snapshot,
                             HTableDescriptor hTableDescriptor)
                      throws IOException
Description copied from interface: MasterObserver
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.

Specified by:
preCloneSnapshot in interface MasterObserver
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

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

Specified by:
postCloneSnapshot in interface MasterObserver
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

public void preRestoreSnapshot(ObserverContext<MasterCoprocessorEnvironment> ctx,
                               HBaseProtos.SnapshotDescription snapshot,
                               HTableDescriptor hTableDescriptor)
                        throws IOException
Description copied from interface: MasterObserver
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.

Specified by:
preRestoreSnapshot in interface MasterObserver
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

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

Specified by:
postRestoreSnapshot in interface MasterObserver
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

public void preDeleteSnapshot(ObserverContext<MasterCoprocessorEnvironment> ctx,
                              HBaseProtos.SnapshotDescription snapshot)
                       throws IOException
Description copied from interface: MasterObserver
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.

Specified by:
preDeleteSnapshot in interface MasterObserver
Parameters:
ctx - the environment to interact with the framework and master
snapshot - the SnapshotDescriptor of the snapshot to delete
Throws:
IOException

postDeleteSnapshot

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

Specified by:
postDeleteSnapshot in interface MasterObserver
Parameters:
ctx - the environment to interact with the framework and master
snapshot - the SnapshotDescriptor of the snapshot to delete
Throws:
IOException

preGetTableDescriptors

public void preGetTableDescriptors(ObserverContext<MasterCoprocessorEnvironment> ctx,
                                   List<TableName> tableNamesList,
                                   List<HTableDescriptor> descriptors)
                            throws IOException
Description copied from interface: MasterObserver
Called before a getTableDescriptors request has been processed.

Specified by:
preGetTableDescriptors in interface MasterObserver
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

public void postGetTableDescriptors(ObserverContext<MasterCoprocessorEnvironment> ctx,
                                    List<HTableDescriptor> descriptors)
                             throws IOException
Description copied from interface: MasterObserver
Called after a getTableDescriptors request has been processed.

Specified by:
postGetTableDescriptors in interface MasterObserver
Parameters:
ctx - the environment to interact with the framework and master
descriptors - the list of descriptors about to be returned
Throws:
IOException


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