Class VerifyWALEntriesReplicationEndpoint

java.lang.Object
org.apache.hbase.thirdparty.com.google.common.util.concurrent.AbstractService
org.apache.hadoop.hbase.replication.BaseReplicationEndpoint
org.apache.hadoop.hbase.replication.VerifyWALEntriesReplicationEndpoint
All Implemented Interfaces:
ReplicationEndpoint, ReplicationPeerConfigListener, org.apache.hbase.thirdparty.com.google.common.util.concurrent.Service

A dummy ReplicationEndpoint that replicates nothing.

Mainly used by ITBLL to check whether all the entries in WAL files are fine, since for normal case, we will only read the WAL files when there are region servers crash and we need to split the log, but for replication we will read all the entries and pass them to the ReplicationEndpoint, so setting up a replication peer can help finding out whether there are broken entries in WAL files.

  • Constructor Details

  • Method Details

    • canReplicateToSameCluster

      public boolean canReplicateToSameCluster()
      Description copied from interface: ReplicationEndpoint
      Whether or not, the replication endpoint can replicate to it's source cluster with the same UUID
      Specified by:
      canReplicateToSameCluster in interface ReplicationEndpoint
      Overrides:
      canReplicateToSameCluster in class BaseReplicationEndpoint
    • getPeerUUID

      public UUID getPeerUUID()
      Description copied from interface: ReplicationEndpoint
      Returns a UUID of the provided peer id. Every HBase cluster instance has a persisted associated UUID. If the replication is not performed to an actual HBase cluster (but some other system), the UUID returned has to uniquely identify the connected target system.
      Returns:
      a UUID or null if the peer cluster does not exist or is not connected.
    • getWALEntryfilter

      Description copied from class: BaseReplicationEndpoint
      Returns a default set of filters
      Specified by:
      getWALEntryfilter in interface ReplicationEndpoint
      Overrides:
      getWALEntryfilter in class BaseReplicationEndpoint
      Returns:
      a WALEntryFilter or null.
    • checkCell

      private void checkCell(Cell cell)
    • replicate

      public boolean replicate(ReplicationEndpoint.ReplicateContext replicateContext)
      Description copied from interface: ReplicationEndpoint
      Replicate the given set of entries (in the context) to the other cluster. Can block until all the given entries are replicated. Upon this method is returned, all entries that were passed in the context are assumed to be persisted in the target cluster.
      Parameters:
      replicateContext - a context where WAL entries and other parameters can be obtained.
    • start

      public void start()
      Description copied from interface: ReplicationEndpoint
      Initiates service startup and returns immediately. A stopped service may not be restarted. Equivalent of startAsync call in Guava Service.
    • stop

      public void stop()
      Description copied from interface: ReplicationEndpoint
      If the service is starting or running, this initiates service shutdown and returns immediately. If the service has already been stopped, this method returns immediately without taking action. Equivalent of stopAsync call in Guava Service.
    • doStart

      protected void doStart()
      Specified by:
      doStart in class org.apache.hbase.thirdparty.com.google.common.util.concurrent.AbstractService
    • doStop

      protected void doStop()
      Specified by:
      doStop in class org.apache.hbase.thirdparty.com.google.common.util.concurrent.AbstractService