@InterfaceAudience.Private public abstract class HBaseReplicationEndpoint extends BaseReplicationEndpoint implements Abortable
BaseReplicationEndpoint
for replication endpoints whose
target cluster is an HBase cluster.Modifier and Type | Class and Description |
---|---|
static class |
HBaseReplicationEndpoint.PeerRegionServerListener
Tracks changes to the list of region servers in a peer's cluster.
|
ReplicationEndpoint.Context, ReplicationEndpoint.ReplicateContext
ctx
Constructor and Description |
---|
HBaseReplicationEndpoint() |
Modifier and Type | Method and Description |
---|---|
void |
abort(String why,
Throwable e)
Abort the server or client.
|
protected void |
disconnect() |
protected void |
doStart() |
protected void |
doStop() |
protected static List<ServerName> |
fetchSlavesAddresses(ZooKeeperWatcher zkw)
Get the list of all the region servers from the specified peer
|
long |
getLastRegionServerUpdate()
Get the timestamp at which the last change occurred to the list of region servers to replicate
to.
|
UUID |
getPeerUUID()
Returns a UUID of the provided peer id.
|
List<ServerName> |
getRegionServers()
Get a list of all the addresses of all the region servers
for this peer cluster
|
protected ZooKeeperWatcher |
getZkw()
Get the ZK connection to this peer
|
boolean |
isAborted()
Check if the server or client was aborted.
|
protected void |
reconnect(org.apache.zookeeper.KeeperException ke)
A private method used to re-establish a zookeeper session with a peer cluster.
|
void |
setRegionServers(List<ServerName> regionServers)
Set the list of region servers for that peer
|
canReplicateToSameCluster, close, getScopeWALEntryFilter, getTableCfWALEntryFilter, getWALEntryfilter, init, peerConfigUpdated
isRunning, notifyFailed, notifyStarted, notifyStopped, start, startAndWait, state, stop, stopAndWait, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
replicate
protected void disconnect()
protected void reconnect(org.apache.zookeeper.KeeperException ke)
ke
- protected void doStart()
doStart
in class com.google.common.util.concurrent.AbstractService
protected void doStop()
doStop
in class com.google.common.util.concurrent.AbstractService
public UUID getPeerUUID()
ReplicationEndpoint
getPeerUUID
in interface ReplicationEndpoint
protected ZooKeeperWatcher getZkw()
public void abort(String why, Throwable e)
Abortable
public boolean isAborted()
Abortable
protected static List<ServerName> fetchSlavesAddresses(ZooKeeperWatcher zkw) throws org.apache.zookeeper.KeeperException
zkw
- zk connection to useorg.apache.zookeeper.KeeperException
public List<ServerName> getRegionServers()
public void setRegionServers(List<ServerName> regionServers)
regionServers
- list of addresses for the region serverspublic long getLastRegionServerUpdate()
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.