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
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static voidappendHFileRefsZNodes(ZKWatcher zkw, String hFileRefsZNode, StringBuilder sb) private static voidappendPeerState(ZKWatcher zkw, String znodeToProcess, StringBuilder sb) private static voidappendPeersZnodes(ZKWatcher zkw, String peersZnode, StringBuilder sb) private static voidappendRSZnodes(ZKWatcher zkw, String znode, StringBuilder sb) static Stringstatic StringReturns a string with replication znodes and position of the replication logprivate static voidAppends 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 theZKWatcherwhich also contains configuration and operationsb- theStringBuilderto 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 theZKWatcherwhich 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.KeeperExceptionorg.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.
-