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.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.hadoop.hbase.replication.ReplicationEndpoint
ReplicationEndpoint.Context, ReplicationEndpoint.ReplicateContext
Nested classes/interfaces inherited from interface org.apache.hbase.thirdparty.com.google.common.util.concurrent.Service
org.apache.hbase.thirdparty.com.google.common.util.concurrent.Service.Listener, org.apache.hbase.thirdparty.com.google.common.util.concurrent.Service.State
-
Field Summary
Fields inherited from class org.apache.hadoop.hbase.replication.BaseReplicationEndpoint
ctx, REPLICATION_WALENTRYFILTER_CONFIG_KEY
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Whether or not, the replication endpoint can replicate to it's source cluster with the same UUIDprivate void
protected void
doStart()
protected void
doStop()
Returns a UUID of the provided peer id.Returns a default set of filtersboolean
replicate
(ReplicationEndpoint.ReplicateContext replicateContext) Replicate the given set of entries (in the context) to the other cluster.void
start()
Initiates service startup and returns immediately.void
stop()
If the service is starting or running, this initiates service shutdown and returns immediately.Methods inherited from class org.apache.hadoop.hbase.replication.BaseReplicationEndpoint
getNamespaceTableCfWALEntryFilter, getScopeWALEntryFilter, init, isStarting, peerConfigUpdated
Methods inherited from class org.apache.hbase.thirdparty.com.google.common.util.concurrent.AbstractService
addListener, awaitRunning, awaitRunning, awaitRunning, awaitTerminated, awaitTerminated, awaitTerminated, doCancelStart, failureCause, isRunning, notifyFailed, notifyStarted, notifyStopped, startAsync, state, stopAsync, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.hadoop.hbase.replication.ReplicationEndpoint
awaitRunning, awaitRunning, awaitTerminated, awaitTerminated, failureCause, isRunning
-
Constructor Details
-
VerifyWALEntriesReplicationEndpoint
public VerifyWALEntriesReplicationEndpoint()
-
-
Method Details
-
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 interfaceReplicationEndpoint
- Overrides:
canReplicateToSameCluster
in classBaseReplicationEndpoint
-
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 interfaceReplicationEndpoint
- Overrides:
getWALEntryfilter
in classBaseReplicationEndpoint
- Returns:
- a
WALEntryFilter
or null.
-
checkCell
-
replicate
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
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
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
- Specified by:
doStart
in classorg.apache.hbase.thirdparty.com.google.common.util.concurrent.AbstractService
-
doStop
- Specified by:
doStop
in classorg.apache.hbase.thirdparty.com.google.common.util.concurrent.AbstractService
-