@InterfaceAudience.LimitedPrivate(value="Replication") public interface ReplicationEndpoint extends com.google.common.util.concurrent.Service
ReplicationPeerConfig
. A ReplicationEndpoint is run in a thread
in each region server in the same process.
ReplicationEndpoint is closely tied to ReplicationSource in a producer-consumer relation. ReplicationSource is an HBase-private class which tails the logs and manages the queue of logs plus management and persistence of all the state for replication. ReplicationEndpoint on the other hand is responsible for doing the actual shipping and persisting of the WAL entries in the other cluster.
Modifier and Type | Interface and Description |
---|---|
static class |
ReplicationEndpoint.Context |
static class |
ReplicationEndpoint.ReplicateContext
A context for
replicate(ReplicateContext) method. |
Modifier and Type | Method and Description |
---|---|
boolean |
canReplicateToSameCluster()
Whether or not, the replication endpoint can replicate to it's source cluster with the same
UUID
|
UUID |
getPeerUUID()
Returns a UUID of the provided peer id.
|
WALEntryFilter |
getWALEntryfilter()
Returns a WALEntryFilter to use for filtering out WALEntries from the log.
|
void |
init(ReplicationEndpoint.Context context)
Initialize the replication endpoint with the given context.
|
boolean |
replicate(ReplicationEndpoint.ReplicateContext replicateContext)
Replicate the given set of entries (in the context) to the other cluster.
|
void init(ReplicationEndpoint.Context context) throws IOException
context
- replication contextIOException
boolean canReplicateToSameCluster()
UUID getPeerUUID()
WALEntryFilter getWALEntryfilter()
WALEntryFilter
or null.boolean replicate(ReplicationEndpoint.ReplicateContext replicateContext)
replicateContext
- a context where WAL entries and other
parameters can be obtained.Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.