@InterfaceAudience.LimitedPrivate(value="Coprocesssor") @InterfaceStability.Evolving public interface RegionServerObserver extends Coprocessor
HRegionServer
process.
Since most implementations will be interested in only a subset of hooks, this class uses
'default' functions to avoid having to add unnecessary overrides. When the functions are
non-empty, it's simply to satisfy the compiler by returning value of expected (non-void) type.
It is done in a way that these default definitions act as no-op. So our suggestion to
implementation would be to not call these 'default' methods from overrides.
IOException
are reported back to client.CoprocessorHost.ABORT_ON_ERROR_KEY
is set to true, then
the server aborts.DoNotRetryIOException
is returned to the client.Coprocessor.State
PRIORITY_HIGHEST, PRIORITY_LOWEST, PRIORITY_SYSTEM, PRIORITY_USER, VERSION
Modifier and Type | Method and Description |
---|---|
default void |
postClearCompactionQueues(ObserverContext<RegionServerCoprocessorEnvironment> ctx)
This will be called after clearing compaction queues
|
default ReplicationEndpoint |
postCreateReplicationEndPoint(ObserverContext<RegionServerCoprocessorEnvironment> ctx,
ReplicationEndpoint endpoint)
This will be called after the replication endpoint is instantiated.
|
default void |
postMerge(ObserverContext<RegionServerCoprocessorEnvironment> ctx,
Region regionA,
Region regionB,
Region mergedRegion)
called after the regions merge.
|
default void |
postMergeCommit(ObserverContext<RegionServerCoprocessorEnvironment> ctx,
Region regionA,
Region regionB,
Region mergedRegion)
This will be called after PONR step as part of regions merge transaction.
|
default void |
postReplicateLogEntries(ObserverContext<RegionServerCoprocessorEnvironment> ctx,
List<org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.WALEntry> entries,
CellScanner cells)
This will be called after executing replication request to shipping log entries.
|
default void |
postRollBackMerge(ObserverContext<RegionServerCoprocessorEnvironment> ctx,
Region regionA,
Region regionB)
This will be called after the roll back of the regions merge.
|
default void |
postRollWALWriterRequest(ObserverContext<RegionServerCoprocessorEnvironment> ctx)
This will be called after executing user request to roll a region server WAL.
|
default void |
preClearCompactionQueues(ObserverContext<RegionServerCoprocessorEnvironment> ctx)
This will be called before clearing compaction queues
|
default void |
preMerge(ObserverContext<RegionServerCoprocessorEnvironment> ctx,
Region regionA,
Region regionB)
Called before the regions merge.
|
default void |
preMergeCommit(ObserverContext<RegionServerCoprocessorEnvironment> ctx,
Region regionA,
Region regionB,
List<Mutation> metaEntries)
This will be called before PONR step as part of regions merge transaction.
|
default void |
preReplicateLogEntries(ObserverContext<RegionServerCoprocessorEnvironment> ctx,
List<org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.WALEntry> entries,
CellScanner cells)
This will be called before executing replication request to shipping log entries.
|
default void |
preRollBackMerge(ObserverContext<RegionServerCoprocessorEnvironment> ctx,
Region regionA,
Region regionB)
This will be called before the roll back of the regions merge.
|
default void |
preRollWALWriterRequest(ObserverContext<RegionServerCoprocessorEnvironment> ctx)
This will be called before executing user request to roll a region server WAL.
|
default void |
preStopRegionServer(ObserverContext<RegionServerCoprocessorEnvironment> ctx)
Called before stopping region server.
|
start, stop
default void preStopRegionServer(ObserverContext<RegionServerCoprocessorEnvironment> ctx) throws IOException
ctx
- the environment to interact with the framework and region server.IOException
default void preMerge(ObserverContext<RegionServerCoprocessorEnvironment> ctx, Region regionA, Region regionB) throws IOException
ObserverContext.bypass()
to skip the merge.ctx
- the environment to interact with the framework and region server.regionA
- region being merged.regionB
- region being merged.IOException
default void postMerge(ObserverContext<RegionServerCoprocessorEnvironment> ctx, Region regionA, Region regionB, Region mergedRegion) throws IOException
ctx
- the environment to interact with the framework and region server.regionA
- region being merged.regionB
- region being merged.IOException
default void preMergeCommit(ObserverContext<RegionServerCoprocessorEnvironment> ctx, Region regionA, Region regionB, @MetaMutationAnnotation List<Mutation> metaEntries) throws IOException
ObserverContext.bypass()
rollback the mergectx
- the environment to interact with the framework and region server.regionA
- region being merged.regionB
- region being merged.metaEntries
- mutations to execute on hbase:meta atomically with regions merge updates.
Any puts or deletes to execute on hbase:meta can be added to the mutations.IOException
default void postMergeCommit(ObserverContext<RegionServerCoprocessorEnvironment> ctx, Region regionA, Region regionB, Region mergedRegion) throws IOException
ctx
- the environment to interact with the framework and region server.regionA
- region being merged.regionB
- region being merged.IOException
default void preRollBackMerge(ObserverContext<RegionServerCoprocessorEnvironment> ctx, Region regionA, Region regionB) throws IOException
ctx
- the environment to interact with the framework and region server.regionA
- region being merged.regionB
- region being merged.IOException
default void postRollBackMerge(ObserverContext<RegionServerCoprocessorEnvironment> ctx, Region regionA, Region regionB) throws IOException
ctx
- the environment to interact with the framework and region server.regionA
- region being merged.regionB
- region being merged.IOException
default void preRollWALWriterRequest(ObserverContext<RegionServerCoprocessorEnvironment> ctx) throws IOException
ctx
- the environment to interact with the framework and region server.IOException
default void postRollWALWriterRequest(ObserverContext<RegionServerCoprocessorEnvironment> ctx) throws IOException
ctx
- the environment to interact with the framework and region server.IOException
default ReplicationEndpoint postCreateReplicationEndPoint(ObserverContext<RegionServerCoprocessorEnvironment> ctx, ReplicationEndpoint endpoint)
ctx
- the environment to interact with the framework and region server.endpoint
- - the base endpoint for replicationdefault void preReplicateLogEntries(ObserverContext<RegionServerCoprocessorEnvironment> ctx, List<org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.WALEntry> entries, CellScanner cells) throws IOException
ctx
- the environment to interact with the framework and region server.entries
- list of WALEntries to replicatecells
- Cells that the WALEntries refer to (if cells is non-null)IOException
default void postReplicateLogEntries(ObserverContext<RegionServerCoprocessorEnvironment> ctx, List<org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.WALEntry> entries, CellScanner cells) throws IOException
ctx
- the environment to interact with the framework and region server.entries
- list of WALEntries to replicatecells
- Cells that the WALEntries refer to (if cells is non-null)IOException
default void preClearCompactionQueues(ObserverContext<RegionServerCoprocessorEnvironment> ctx) throws IOException
ctx
- the environment to interact with the framework and region server.IOException
default void postClearCompactionQueues(ObserverContext<RegionServerCoprocessorEnvironment> ctx) throws IOException
ctx
- the environment to interact with the framework and region server.IOException
Copyright © 2007–2017 The Apache Software Foundation. All rights reserved.