Class BaseReplicationEndpoint
java.lang.Object
org.apache.hbase.thirdparty.com.google.common.util.concurrent.AbstractService
org.apache.hadoop.hbase.replication.BaseReplicationEndpoint
- All Implemented Interfaces:
ReplicationEndpoint
,ReplicationPeerConfigListener
,org.apache.hbase.thirdparty.com.google.common.util.concurrent.Service
- Direct Known Subclasses:
HBaseReplicationEndpoint
,VerifyWALEntriesReplicationEndpoint
@Private
public abstract class BaseReplicationEndpoint
extends org.apache.hbase.thirdparty.com.google.common.util.concurrent.AbstractService
implements ReplicationEndpoint
A Base implementation for
ReplicationEndpoint
s. For internal use. Uses our internal
Guava.-
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
Modifier and TypeFieldDescriptionprotected ReplicationEndpoint.Context
private static final org.slf4j.Logger
static final String
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Whether or not, the replication endpoint can replicate to it's source cluster with the same UUIDprotected WALEntryFilter
Returns a WALEntryFilter for checking replication per table and CF.protected WALEntryFilter
Returns a WALEntryFilter for checking the scope.Returns a default set of filtersvoid
init
(ReplicationEndpoint.Context context) Initialize the replication endpoint with the given context.boolean
Returns Returntrue
is this service is STARTING (but not yet RUNNING).void
Callback method for when users update the ReplicationPeerConfig for this peerMethods inherited from class org.apache.hbase.thirdparty.com.google.common.util.concurrent.AbstractService
addListener, awaitRunning, awaitRunning, awaitRunning, awaitTerminated, awaitTerminated, awaitTerminated, doCancelStart, doStart, doStop, 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, getPeerUUID, isRunning, replicate, start, stop
-
Field Details
-
LOG
-
REPLICATION_WALENTRYFILTER_CONFIG_KEY
- See Also:
-
ctx
-
-
Constructor Details
-
BaseReplicationEndpoint
public BaseReplicationEndpoint()
-
-
Method Details
-
init
Description copied from interface:ReplicationEndpoint
Initialize the replication endpoint with the given context.- Specified by:
init
in interfaceReplicationEndpoint
- Parameters:
context
- replication context- Throws:
IOException
- error occur when initialize the endpoint.
-
peerConfigUpdated
Description copied from interface:ReplicationPeerConfigListener
Callback method for when users update the ReplicationPeerConfig for this peer- Specified by:
peerConfigUpdated
in interfaceReplicationPeerConfigListener
- Parameters:
rpc
- The updated ReplicationPeerConfig
-
getWALEntryfilter
Returns a default set of filters- Specified by:
getWALEntryfilter
in interfaceReplicationEndpoint
- Returns:
- a
WALEntryFilter
or null.
-
getScopeWALEntryFilter
Returns a WALEntryFilter for checking the scope. Subclasses can return null if they don't want this filter -
getNamespaceTableCfWALEntryFilter
Returns a WALEntryFilter for checking replication per table and CF. Subclasses can return null if they don't want this filter -
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
-
isStarting
Description copied from interface:ReplicationEndpoint
Returns Returntrue
is this service is STARTING (but not yet RUNNING).- Specified by:
isStarting
in interfaceReplicationEndpoint
-