@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.PeerRegionServerListenerTracks changes to the list of region servers in a peer's cluster. | 
ReplicationEndpoint.Context, ReplicationEndpoint.ReplicateContext| Modifier and Type | Field and Description | 
|---|---|
| private long | lastRegionServerUpdate | 
| private static org.slf4j.Logger | LOG | 
| private List<ServerName> | regionServers | 
| private ZKWatcher | zkw | 
ctx, REPLICATION_WALENTRYFILTER_CONFIG_KEY| 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(ZKWatcher 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 available region servers
 for this peer cluster, or an empty list if no region servers available at peer cluster. | 
| protected ZKWatcher | 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. | 
| (package private) void | reloadZkWatcher()Closes the current ZKW (if not null) and creates a new one | 
| void | setRegionServers(List<ServerName> regionServers)Set the list of region servers for that peer | 
| void | start()Initiates service startup and returns immediately. | 
| void | stop()If the service is starting or running, this initiates service shutdown and returns immediately. | 
canReplicateToSameCluster, getNamespaceTableCfWALEntryFilter, getScopeWALEntryFilter, getWALEntryfilter, init, isStarting, peerConfigUpdatedaddListener, awaitRunning, awaitRunning, awaitRunning, awaitTerminated, awaitTerminated, awaitTerminated, doCancelStart, failureCause, isRunning, notifyFailed, notifyStarted, notifyStopped, startAsync, state, stopAsync, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitawaitRunning, awaitRunning, awaitTerminated, awaitTerminated, failureCause, isRunning, replicateprivate static final org.slf4j.Logger LOG
private List<ServerName> regionServers
private long lastRegionServerUpdate
public HBaseReplicationEndpoint()
protected void disconnect()
protected void reconnect(org.apache.zookeeper.KeeperException ke)
ke - public void start()
ReplicationEndpointstart in interface ReplicationEndpointpublic void stop()
ReplicationEndpointstop in interface ReplicationEndpointprotected void doStart()
doStart in class org.apache.hbase.thirdparty.com.google.common.util.concurrent.AbstractServiceprotected void doStop()
doStop in class org.apache.hbase.thirdparty.com.google.common.util.concurrent.AbstractServicepublic UUID getPeerUUID()
ReplicationEndpointgetPeerUUID in interface ReplicationEndpointvoid reloadZkWatcher() throws IOException
IOException - If anything goes wrong connectingpublic void abort(String why, Throwable e)
Abortablepublic boolean isAborted()
Abortableprotected static List<ServerName> fetchSlavesAddresses(ZKWatcher zkw) throws org.apache.zookeeper.KeeperException
zkw - zk connection to useorg.apache.zookeeper.KeeperExceptionpublic List<ServerName> getRegionServers()
public void setRegionServers(List<ServerName> regionServers)
regionServers - list of addresses for the region serverspublic long getLastRegionServerUpdate()
Copyright © 2007–2021 The Apache Software Foundation. All rights reserved.