@InterfaceAudience.Private public abstract class ReplicationStateZKBase extends Object
Modifier and Type | Field and Description |
---|---|
protected Abortable |
abortable |
protected org.apache.hadoop.conf.Configuration |
conf |
static byte[] |
DISABLED_ZNODE_BYTES |
static byte[] |
ENABLED_ZNODE_BYTES |
protected String |
hfileRefsZNode
The name of the znode that contains queues of hfile references to be replicated
|
protected String |
ourClusterKey
The cluster key of the local cluster
|
protected String |
peerStateNodeName
The name of the znode that contains the replication status of a remote slave (i.e.
|
protected String |
peersZNode
The name of the znode that contains a list of all remote slave (i.e.
|
protected String |
queuesZNode
The name of the znode that contains all replication queues
|
protected String |
replicationZNode
The name of the base znode that contains all replication state.
|
protected String |
tableCFsNodeName
The name of the znode that contains tableCFs
|
protected ZooKeeperWatcher |
zookeeper |
static String |
ZOOKEEPER_ZNODE_REPLICATION_HFILE_REFS_DEFAULT |
static String |
ZOOKEEPER_ZNODE_REPLICATION_HFILE_REFS_KEY |
Constructor and Description |
---|
ReplicationStateZKBase(ZooKeeperWatcher zookeeper,
org.apache.hadoop.conf.Configuration conf,
Abortable abortable) |
Modifier and Type | Method and Description |
---|---|
protected List<String> |
getListOfReplicatorsZK()
Subclasses that use ZK explicitly can just call this directly while classes
that are trying to hide internal details of storage can wrap the KeeperException
into a ReplicationException or something else.
|
protected String |
getPeerNode(String id) |
protected String |
getPeerStateNode(String id) |
protected String |
getTableCFsNode(String id) |
protected boolean |
isPeerPath(String path)
Determine if a ZK path points to a peer node.
|
protected boolean |
peerExists(String id) |
protected static byte[] |
toByteArray(org.apache.hadoop.hbase.protobuf.generated.ZooKeeperProtos.ReplicationState.State state) |
protected final String peerStateNodeName
protected final String replicationZNode
protected final String peersZNode
protected final String queuesZNode
protected final String hfileRefsZNode
protected final String ourClusterKey
protected final String tableCFsNodeName
protected final ZooKeeperWatcher zookeeper
protected final org.apache.hadoop.conf.Configuration conf
protected final Abortable abortable
public static final byte[] ENABLED_ZNODE_BYTES
public static final byte[] DISABLED_ZNODE_BYTES
public static final String ZOOKEEPER_ZNODE_REPLICATION_HFILE_REFS_KEY
public static final String ZOOKEEPER_ZNODE_REPLICATION_HFILE_REFS_DEFAULT
public ReplicationStateZKBase(ZooKeeperWatcher zookeeper, org.apache.hadoop.conf.Configuration conf, Abortable abortable)
protected List<String> getListOfReplicatorsZK() throws org.apache.zookeeper.KeeperException
org.apache.zookeeper.KeeperException
protected static byte[] toByteArray(org.apache.hadoop.hbase.protobuf.generated.ZooKeeperProtos.ReplicationState.State state)
state
- state
with pb magic prefix prepended suitable for
use as content of a peer-state znode under a peer cluster id as in
/hbase/replication/peers/PEER_ID/peer-state.protected boolean peerExists(String id) throws org.apache.zookeeper.KeeperException
org.apache.zookeeper.KeeperException
protected boolean isPeerPath(String path)
path
- path to be checkedCopyright © 2007–2019 The Apache Software Foundation. All rights reserved.