Interface Coprocessor

All Known Subinterfaces:
MasterCoprocessor, RegionCoprocessor, RegionServerCoprocessor, WALCoprocessor
All Known Implementing Classes:
AccessController, BackupObserver, BulkDeleteEndpoint, ConstraintProcessor, CoprocessorWhitelistMasterObserver, ExampleMasterObserverWithMetrics, ExampleRegionObserverWithMetrics, ExampleRegionObserverWithMetrics.ExampleRegionObserver, JMXListener, MasterQuotasObserver, MetaTableMetrics, MetaTableMetrics.ExampleRegionObserverMeta, MultiRowMutationEndpoint, RefreshHFilesEndpoint, ReplicationObserver, RowCountEndpoint, RSGroupAdminEndpoint, ScanModifyingObserver, SnapshotScannerHDFSAclController, TokenProvider, ValueRewritingObserver, VisibilityController, VisibilityReplication, WriteHeavyIncrementObserver, WriteSinkCoprocessor, ZooKeeperScanPolicyObserver

@LimitedPrivate("Coprocesssor") @Evolving public interface Coprocessor
Base interface for the 4 coprocessors - MasterCoprocessor, RegionCoprocessor, RegionServerCoprocessor, and WALCoprocessor. Do NOT implement this interface directly. Unless an implementation implements one (or more) of the above mentioned 4 coprocessors, it'll fail to be loaded by any coprocessor host. Example: Building a coprocessor to observe Master operations.
 class MyMasterCoprocessor implements MasterCoprocessor {
   @Override
   public Optional<MasterObserver> getMasterObserver() {
     return new MyMasterObserver();
   }
 }

 class MyMasterObserver implements MasterObserver {
   ....
 }
 
Building a Service which can be loaded by both Master and RegionServer
 class MyCoprocessorService implements MasterCoprocessor, RegionServerCoprocessor {
   @Override
   public Optional<Service> getServices() {
     return new ...;
   }
 }
 
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static enum 
    Lifecycle state of a given coprocessor instance.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    Highest installation priority
    static final int
    Lowest installation priority
    static final int
    High (system) installation priority
    static final int
    Default installation priority for user coprocessors
    static final int
     
  • Method Summary

    Modifier and Type
    Method
    Description
    default Iterable<org.apache.hbase.thirdparty.com.google.protobuf.Service>
    Coprocessor endpoints providing protobuf services should override this method.
    default void
    Called by the CoprocessorEnvironment during it's own startup to initialize the coprocessor.
    default void
    Called by the CoprocessorEnvironment during it's own shutdown to stop the coprocessor.