|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hadoop.hbase.replication.ReplicationPeer
public class ReplicationPeer
This class acts as a wrapper for all the objects used to identify and communicate with remote peers and is responsible for answering to expired sessions and re-establishing the ZK connections.
| Constructor Summary | |
|---|---|
ReplicationPeer(org.apache.hadoop.conf.Configuration conf,
String key,
String id)
Constructor that takes all the objects required to communicate with the specified peer, except for the region server addresses. |
|
| Method Summary | |
|---|---|
void |
abort(String why,
Throwable e)
Abort the server or client. |
String |
getClusterKey()
Get the cluster key of that peer |
org.apache.hadoop.conf.Configuration |
getConfiguration()
Get the configuration object required to communicate with this peer |
String |
getId()
Get the identifier of this peer |
AtomicBoolean |
getPeerEnabled()
Get the state of this peer |
List<ServerName> |
getRegionServers()
Get a list of all the addresses of all the region servers for this peer cluster |
ZooKeeperWatcher |
getZkw()
Get the ZK connection to this peer |
boolean |
isAborted()
Check if the server or client was aborted. |
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 |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ReplicationPeer(org.apache.hadoop.conf.Configuration conf,
String key,
String id)
throws IOException
conf - configuration object to this peerkey - cluster key used to locate the peerid - string representation of this peer's identifier
IOException| Method Detail |
|---|
public String getClusterKey()
public AtomicBoolean getPeerEnabled()
public List<ServerName> getRegionServers()
public void setRegionServers(List<ServerName> regionServers)
regionServers - list of addresses for the region serverspublic ZooKeeperWatcher getZkw()
public String getId()
public org.apache.hadoop.conf.Configuration getConfiguration()
public void abort(String why,
Throwable e)
Abortable
abort in interface Abortablewhy - Why we're aborting.e - Throwable that caused abort. Can be null.
public void reloadZkWatcher()
throws IOException
IOException - If anything goes wrong connectingpublic boolean isAborted()
Abortable
isAborted in interface Abortable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||