public interface MasterObserver extends Coprocessor
HMaster
process.Coprocessor.State
PRIORITY_HIGHEST, PRIORITY_LOWEST, PRIORITY_SYSTEM, PRIORITY_USER, VERSION
Modifier and Type | Method and Description |
---|---|
void |
postAddColumn(ObserverContext<MasterCoprocessorEnvironment> ctx,
byte[] 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)
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 |
postCreateTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
HTableDescriptor desc,
HRegionInfo[] regions)
Called after the createTable operation has been requested.
|
void |
postDeleteColumn(ObserverContext<MasterCoprocessorEnvironment> ctx,
byte[] tableName,
byte[] c)
Called after the column family has been deleted.
|
void |
postDeleteSnapshot(ObserverContext<MasterCoprocessorEnvironment> ctx,
HBaseProtos.SnapshotDescription snapshot)
Called after the delete snapshot operation has been requested.
|
void |
postDeleteTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
byte[] tableName)
Called after the deleteTable operation has been requested.
|
void |
postDisableTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
byte[] tableName)
Called after the disableTable operation has been requested.
|
void |
postEnableTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
byte[] 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,
byte[] tableName,
HColumnDescriptor descriptor)
Called after the column family has been updated.
|
void |
postModifyTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
byte[] tableName,
HTableDescriptor htd)
Called after the modifyTable operation has been requested.
|
void |
postMove(ObserverContext<MasterCoprocessorEnvironment> ctx,
HRegionInfo region,
ServerName srcServer,
ServerName destServer)
Called after the region move has been requested.
|
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,
byte[] 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 |
preCreateTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
HTableDescriptor desc,
HRegionInfo[] regions)
Called before a new table is created by
HMaster . |
void |
preDeleteColumn(ObserverContext<MasterCoprocessorEnvironment> ctx,
byte[] tableName,
byte[] c)
Called prior to deleting the entire column family.
|
void |
preDeleteSnapshot(ObserverContext<MasterCoprocessorEnvironment> ctx,
HBaseProtos.SnapshotDescription snapshot)
Called before a snapshot is deleted.
|
void |
preDeleteTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
byte[] tableName)
Called before
HMaster deletes a
table
It can't bypass the default action, e.g., ctx.bypass() won't have effect. |
void |
preDisableTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
byte[] tableName)
Called prior to disabling a table.
|
void |
preEnableTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
byte[] tableName)
Called prior to enabling a table.
|
void |
preGetTableDescriptors(ObserverContext<MasterCoprocessorEnvironment> ctx,
List<String> tableNamesList,
List<HTableDescriptor> descriptors)
Called before a getTableDescriptors request has been processed.
|
void |
preModifyColumn(ObserverContext<MasterCoprocessorEnvironment> ctx,
byte[] tableName,
HColumnDescriptor descriptor)
Called prior to modifying a column family's attributes.
|
void |
preModifyTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
byte[] 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 |
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.
|
start, stop
void preCreateTable(ObserverContext<MasterCoprocessorEnvironment> ctx, HTableDescriptor desc, HRegionInfo[] regions) throws IOException
HMaster
.
It can't bypass the default action, e.g., ctx.bypass() won't have effect.ctx
- the environment to interact with the framework and masterdesc
- the HTableDescriptor for the tableregions
- the initial regions created for the tableIOException
void postCreateTable(ObserverContext<MasterCoprocessorEnvironment> ctx, HTableDescriptor desc, HRegionInfo[] regions) throws IOException
ctx
- the environment to interact with the framework and masterdesc
- the HTableDescriptor for the tableregions
- the initial regions created for the tableIOException
void preDeleteTable(ObserverContext<MasterCoprocessorEnvironment> ctx, byte[] tableName) throws IOException
HMaster
deletes a
table
It can't bypass the default action, e.g., ctx.bypass() won't have effect.ctx
- the environment to interact with the framework and mastertableName
- the name of the tableIOException
void postDeleteTable(ObserverContext<MasterCoprocessorEnvironment> ctx, byte[] tableName) throws IOException
ctx
- the environment to interact with the framework and mastertableName
- the name of the tableIOException
void preModifyTable(ObserverContext<MasterCoprocessorEnvironment> ctx, byte[] tableName, HTableDescriptor htd) throws IOException
ctx
- the environment to interact with the framework and mastertableName
- the name of the tablehtd
- the HTableDescriptorIOException
void postModifyTable(ObserverContext<MasterCoprocessorEnvironment> ctx, byte[] tableName, HTableDescriptor htd) throws IOException
ctx
- the environment to interact with the framework and mastertableName
- the name of the tablehtd
- the HTableDescriptorIOException
void preAddColumn(ObserverContext<MasterCoprocessorEnvironment> ctx, byte[] tableName, HColumnDescriptor column) throws IOException
ctx
- the environment to interact with the framework and mastertableName
- the name of the tablecolumn
- the HColumnDescriptorIOException
void postAddColumn(ObserverContext<MasterCoprocessorEnvironment> ctx, byte[] tableName, HColumnDescriptor column) throws IOException
ctx
- the environment to interact with the framework and mastertableName
- the name of the tablecolumn
- the HColumnDescriptorIOException
void preModifyColumn(ObserverContext<MasterCoprocessorEnvironment> ctx, byte[] tableName, HColumnDescriptor descriptor) throws IOException
ctx
- the environment to interact with the framework and mastertableName
- the name of the tabledescriptor
- the HColumnDescriptorIOException
void postModifyColumn(ObserverContext<MasterCoprocessorEnvironment> ctx, byte[] tableName, HColumnDescriptor descriptor) throws IOException
ctx
- the environment to interact with the framework and mastertableName
- the name of the tabledescriptor
- the HColumnDescriptorIOException
void preDeleteColumn(ObserverContext<MasterCoprocessorEnvironment> ctx, byte[] tableName, byte[] c) throws IOException
ctx
- the environment to interact with the framework and mastertableName
- the name of the tablec
- the columnIOException
void postDeleteColumn(ObserverContext<MasterCoprocessorEnvironment> ctx, byte[] tableName, byte[] c) throws IOException
ctx
- the environment to interact with the framework and mastertableName
- the name of the tablec
- the columnIOException
void preEnableTable(ObserverContext<MasterCoprocessorEnvironment> ctx, byte[] tableName) throws IOException
ctx
- the environment to interact with the framework and mastertableName
- the name of the tableIOException
void postEnableTable(ObserverContext<MasterCoprocessorEnvironment> ctx, byte[] tableName) throws IOException
ctx
- the environment to interact with the framework and mastertableName
- the name of the tableIOException
void preDisableTable(ObserverContext<MasterCoprocessorEnvironment> ctx, byte[] tableName) throws IOException
ctx
- the environment to interact with the framework and mastertableName
- the name of the tableIOException
void postDisableTable(ObserverContext<MasterCoprocessorEnvironment> ctx, byte[] tableName) throws IOException
ctx
- the environment to interact with the framework and mastertableName
- the name of the tableIOException
void preMove(ObserverContext<MasterCoprocessorEnvironment> ctx, HRegionInfo region, ServerName srcServer, ServerName destServer) throws IOException
ctx
- the environment to interact with the framework and masterregion
- the HRegionInfosrcServer
- the source ServerNamedestServer
- the destination ServerNameIOException
void postMove(ObserverContext<MasterCoprocessorEnvironment> ctx, HRegionInfo region, ServerName srcServer, ServerName destServer) throws IOException
ctx
- the environment to interact with the framework and masterregion
- the HRegionInfosrcServer
- the source ServerNamedestServer
- the destination ServerNameIOException
void preAssign(ObserverContext<MasterCoprocessorEnvironment> ctx, HRegionInfo regionInfo) throws IOException
ctx
- the environment to interact with the framework and masterregionInfo
- the regionInfo of the regionIOException
void postAssign(ObserverContext<MasterCoprocessorEnvironment> ctx, HRegionInfo regionInfo) throws IOException
ctx
- the environment to interact with the framework and masterregionInfo
- the regionInfo of the regionIOException
void preUnassign(ObserverContext<MasterCoprocessorEnvironment> ctx, HRegionInfo regionInfo, boolean force) throws IOException
ctx
- the environment to interact with the framework and masterregionInfo
- force
- whether to force unassignment or notIOException
void postUnassign(ObserverContext<MasterCoprocessorEnvironment> ctx, HRegionInfo regionInfo, boolean force) throws IOException
ctx
- the environment to interact with the framework and masterregionInfo
- force
- whether to force unassignment or notIOException
void preBalance(ObserverContext<MasterCoprocessorEnvironment> ctx) throws IOException
ctx
- the environment to interact with the framework and masterIOException
void postBalance(ObserverContext<MasterCoprocessorEnvironment> ctx) throws IOException
ctx
- the environment to interact with the framework and masterIOException
boolean preBalanceSwitch(ObserverContext<MasterCoprocessorEnvironment> ctx, boolean newValue) throws IOException
ctx
- the coprocessor instance's environmentnewValue
- the new flag value submitted in the callIOException
void postBalanceSwitch(ObserverContext<MasterCoprocessorEnvironment> ctx, boolean oldValue, boolean newValue) throws IOException
ctx
- the coprocessor instance's environmentoldValue
- the previously set balanceSwitch valuenewValue
- the newly set balanceSwitch valueIOException
void preShutdown(ObserverContext<MasterCoprocessorEnvironment> ctx) throws IOException
HMaster
process.IOException
void preStopMaster(ObserverContext<MasterCoprocessorEnvironment> ctx) throws IOException
HMaster
process.IOException
void postStartMaster(ObserverContext<MasterCoprocessorEnvironment> ctx) throws IOException
IOException
void preSnapshot(ObserverContext<MasterCoprocessorEnvironment> ctx, HBaseProtos.SnapshotDescription snapshot, HTableDescriptor hTableDescriptor) throws IOException
ctx
- the environment to interact with the framework and mastersnapshot
- the SnapshotDescriptor for the snapshothTableDescriptor
- the hTableDescriptor of the table to snapshotIOException
void postSnapshot(ObserverContext<MasterCoprocessorEnvironment> ctx, HBaseProtos.SnapshotDescription snapshot, HTableDescriptor hTableDescriptor) throws IOException
ctx
- the environment to interact with the framework and mastersnapshot
- the SnapshotDescriptor for the snapshothTableDescriptor
- the hTableDescriptor of the table to snapshotIOException
void preCloneSnapshot(ObserverContext<MasterCoprocessorEnvironment> ctx, HBaseProtos.SnapshotDescription snapshot, HTableDescriptor hTableDescriptor) throws IOException
ctx
- the environment to interact with the framework and mastersnapshot
- the SnapshotDescriptor for the snapshothTableDescriptor
- the hTableDescriptor of the table to createIOException
void postCloneSnapshot(ObserverContext<MasterCoprocessorEnvironment> ctx, HBaseProtos.SnapshotDescription snapshot, HTableDescriptor hTableDescriptor) throws IOException
ctx
- the environment to interact with the framework and mastersnapshot
- the SnapshotDescriptor for the snapshothTableDescriptor
- the hTableDescriptor of the table to createIOException
void preRestoreSnapshot(ObserverContext<MasterCoprocessorEnvironment> ctx, HBaseProtos.SnapshotDescription snapshot, HTableDescriptor hTableDescriptor) throws IOException
ctx
- the environment to interact with the framework and mastersnapshot
- the SnapshotDescriptor for the snapshothTableDescriptor
- the hTableDescriptor of the table to restoreIOException
void postRestoreSnapshot(ObserverContext<MasterCoprocessorEnvironment> ctx, HBaseProtos.SnapshotDescription snapshot, HTableDescriptor hTableDescriptor) throws IOException
ctx
- the environment to interact with the framework and mastersnapshot
- the SnapshotDescriptor for the snapshothTableDescriptor
- the hTableDescriptor of the table to restoreIOException
void preDeleteSnapshot(ObserverContext<MasterCoprocessorEnvironment> ctx, HBaseProtos.SnapshotDescription snapshot) throws IOException
ctx
- the environment to interact with the framework and mastersnapshot
- the SnapshotDescriptor of the snapshot to deleteIOException
void postDeleteSnapshot(ObserverContext<MasterCoprocessorEnvironment> ctx, HBaseProtos.SnapshotDescription snapshot) throws IOException
ctx
- the environment to interact with the framework and mastersnapshot
- the SnapshotDescriptor of the snapshot to deleteIOException
void preGetTableDescriptors(ObserverContext<MasterCoprocessorEnvironment> ctx, List<String> tableNamesList, List<HTableDescriptor> descriptors) throws IOException
ctx
- the environment to interact with the framework and mastertableNamesList
- the list of table names, or null if querying for alldescriptors
- an empty list, can be filled with what to return if bypassingIOException
void postGetTableDescriptors(ObserverContext<MasterCoprocessorEnvironment> ctx, List<HTableDescriptor> descriptors) throws IOException
ctx
- the environment to interact with the framework and masterdescriptors
- the list of descriptors about to be returnedIOException
Copyright © 2014 The Apache Software Foundation. All Rights Reserved.