@InterfaceAudience.Private public class HBaseInterClusterReplicationEndpoint extends HBaseReplicationEndpoint
ReplicationEndpoint
implementation for replicating to another HBase cluster.
For the slave cluster it selects a random number of peers
using a replication ratio. For example, if replication ration = 0.1
and slave cluster has 100 region servers, 10 will be selected.
A stream is considered down when we cannot contact a region server on the peer cluster for more than 55 seconds by default.
| Modifier and Type | Class and Description |
|---|---|
protected class |
HBaseInterClusterReplicationEndpoint.Replicator |
HBaseReplicationEndpoint.PeerRegionServerListenerReplicationEndpoint.Context, ReplicationEndpoint.ReplicateContextctx| Constructor and Description |
|---|
HBaseInterClusterReplicationEndpoint() |
| Modifier and Type | Method and Description |
|---|---|
protected HBaseInterClusterReplicationEndpoint.Replicator |
createReplicator(List<WAL.Entry> entries,
int ordinal) |
protected void |
doStop() |
void |
init(ReplicationEndpoint.Context context)
Initialize the replication endpoint with the given context.
|
protected boolean |
isPeerEnabled() |
boolean |
replicate(ReplicationEndpoint.ReplicateContext replicateContext)
Do the shipping logic
|
protected boolean |
sleepForRetries(String msg,
int sleepMultiplier)
Do the sleeping logic
|
com.google.common.util.concurrent.Service.State |
stopAndWait() |
abort, disconnect, doStart, fetchSlavesAddresses, getLastRegionServerUpdate, getPeerUUID, getRegionServers, getZkw, isAborted, reconnect, setRegionServerscanReplicateToSameCluster, close, getScopeWALEntryFilter, getTableCfWALEntryFilter, getWALEntryfilter, peerConfigUpdatedisRunning, notifyFailed, notifyStarted, notifyStopped, start, startAndWait, state, stop, toStringpublic HBaseInterClusterReplicationEndpoint()
public void init(ReplicationEndpoint.Context context) throws IOException
ReplicationEndpointinit in interface ReplicationEndpointinit in class BaseReplicationEndpointcontext - replication contextIOExceptionprotected boolean sleepForRetries(String msg, int sleepMultiplier)
msg - Why we sleepsleepMultiplier - by how many times the default sleeping time is augmentedsleepMultiplier is < maxRetriesMultiplierpublic boolean replicate(ReplicationEndpoint.ReplicateContext replicateContext)
replicateContext - a context where WAL entries and other
parameters can be obtained.protected boolean isPeerEnabled()
protected void doStop()
doStop in class HBaseReplicationEndpointpublic com.google.common.util.concurrent.Service.State stopAndWait()
stopAndWait in interface com.google.common.util.concurrent.ServicestopAndWait in class com.google.common.util.concurrent.AbstractServiceprotected HBaseInterClusterReplicationEndpoint.Replicator createReplicator(List<WAL.Entry> entries, int ordinal)
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.