Class HQuorumPeer

java.lang.Object
org.apache.hadoop.hbase.zookeeper.HQuorumPeer

@LimitedPrivate("Tools") @Evolving public final class HQuorumPeer extends Object
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 Details

  • Method Details

    • main

      public static void main(String[] args)
      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:
      IOException
      org.apache.zookeeper.server.admin.AdminServer.AdminServerException
    • addressIsLocalHost

      private static boolean addressIsLocalHost(String address)
    • writeMyID

      static void writeMyID(Properties properties) throws IOException
      Throws:
      IOException