Class ZKDump
java.lang.Object
org.apache.hadoop.hbase.zookeeper.ZKDump
Builds a string containing everything in ZooKeeper. This is inherently invasive into the
structures of other components' logical responsibilities.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate static void
appendHFileRefsZNodes
(ZKWatcher zkw, String hFileRefsZNode, StringBuilder sb) private static void
appendPeerState
(ZKWatcher zkw, String znodeToProcess, StringBuilder sb) private static void
appendPeersZnodes
(ZKWatcher zkw, String peersZnode, StringBuilder sb) private static void
appendRSZnodes
(ZKWatcher zkw, String znode, StringBuilder sb) static String
static String
Returns a string with replication znodes and position of the replication logprivate static void
Appends replication znodes to the passed StringBuilder.private static String[]
getServerStats
(String server, int timeout) Gets the statistics from the given server.
-
Field Details
-
LOG
-
-
Constructor Details
-
ZKDump
private ZKDump()
-
-
Method Details
-
dump
-
getReplicationZnodesDump
private static void getReplicationZnodesDump(ZKWatcher zkw, StringBuilder sb) throws org.apache.zookeeper.KeeperException Appends replication znodes to the passed StringBuilder.- Parameters:
zkw
- reference to theZKWatcher
which also contains configuration and operationsb
- theStringBuilder
to append to- Throws:
org.apache.zookeeper.KeeperException
- if a ZooKeeper operation fails
-
appendHFileRefsZNodes
private static void appendHFileRefsZNodes(ZKWatcher zkw, String hFileRefsZNode, StringBuilder sb) throws org.apache.zookeeper.KeeperException - Throws:
org.apache.zookeeper.KeeperException
-
getReplicationZnodesDump
public static String getReplicationZnodesDump(ZKWatcher zkw) throws org.apache.zookeeper.KeeperException Returns a string with replication znodes and position of the replication log- Parameters:
zkw
- reference to theZKWatcher
which also contains configuration and operation- Returns:
- aq string of replication znodes and log positions
- Throws:
org.apache.zookeeper.KeeperException
-
appendRSZnodes
private static void appendRSZnodes(ZKWatcher zkw, String znode, StringBuilder sb) throws org.apache.zookeeper.KeeperException - Throws:
org.apache.zookeeper.KeeperException
-
appendPeersZnodes
private static void appendPeersZnodes(ZKWatcher zkw, String peersZnode, StringBuilder sb) throws org.apache.zookeeper.KeeperException - Throws:
org.apache.zookeeper.KeeperException
-
appendPeerState
private static void appendPeerState(ZKWatcher zkw, String znodeToProcess, StringBuilder sb) throws org.apache.zookeeper.KeeperException, org.apache.hbase.thirdparty.com.google.protobuf.InvalidProtocolBufferException - Throws:
org.apache.zookeeper.KeeperException
org.apache.hbase.thirdparty.com.google.protobuf.InvalidProtocolBufferException
-
getServerStats
Gets the statistics from the given server.- Parameters:
server
- The server to get the statistics from.timeout
- The socket timeout to use.- Returns:
- The array of response strings.
- Throws:
IOException
- When the socket communication fails.
-