Class HQuorumPeer
java.lang.Object
org.apache.hadoop.hbase.zookeeper.HQuorumPeer
HBase's version of ZooKeeper's QuorumPeer. When HBase is set to manage ZooKeeper, this class is
used to start up QuorumPeer instances. By doing things in here rather than directly calling to
ZooKeeper, we have more control over the process. This class uses
ZKConfig to get
settings from the hbase-site.xml file.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static booleanaddressIsLocalHost(String address) static voidParse ZooKeeper configuration from HBase XML config and run a QuorumPeer.private static voidrunZKServer(org.apache.zookeeper.server.quorum.QuorumPeerConfig zkConfig) (package private) static voidwriteMyID(Properties properties)
-
Constructor Details
-
HQuorumPeer
private HQuorumPeer()
-
-
Method Details
-
main
Parse ZooKeeper configuration from HBase XML config and run a QuorumPeer.- Parameters:
args- String[] of command line arguments. Not used.
-
runZKServer
private static void runZKServer(org.apache.zookeeper.server.quorum.QuorumPeerConfig zkConfig) throws IOException, org.apache.zookeeper.server.admin.AdminServer.AdminServerException - Throws:
IOExceptionorg.apache.zookeeper.server.admin.AdminServer.AdminServerException
-
addressIsLocalHost
-
writeMyID
- Throws:
IOException
-