Class ControllerServerConfig


  • public class ControllerServerConfig
    extends QuorumPeerConfig
    Config for the ControllerService. Responsible for providing the minimum set of configurations that's required to spin up a single member ensemble.
    • Field Detail

      • CONTROLLER_PORT_KEY

        public static final java.lang.String CONTROLLER_PORT_KEY
        See Also:
        Constant Field Values
    • Constructor Detail

      • ControllerServerConfig

        public ControllerServerConfig​(java.net.InetAddress hostAddress,
                                      int controllerPort,
                                      int zkServerPort,
                                      java.lang.String dataDirPath)
        Instantiate a config object with required parameters.
        Parameters:
        hostAddress - The address to bind to (likely loopback or localhost)
        controllerPort - Port the controller will listen for incoming control command sent from CommandClient.
        zkServerPort - Port the ZooKeeper server will listen on.
        dataDirPath - Path to the data directory that ZooKeeperServer uses.
      • ControllerServerConfig

        public ControllerServerConfig​(int controllerPort,
                                      int zkServerPort,
                                      java.lang.String dataDirPath)
        Instantiate a config object with required parameters.
        Parameters:
        controllerPort - Port the controller will listen for incoming control command sent from CommandClient.
        zkServerPort - Port the ZooKeeper server will listen on.
        dataDirPath - Path to the data directory that ZooKeeperServer uses.
    • Method Detail

      • getControllerAddress

        public java.net.InetSocketAddress getControllerAddress()
      • getZooKeeperServerConfig

        public ServerConfig getZooKeeperServerConfig()
      • ensureComplete

        public void ensureComplete()
                            throws java.io.IOException
        Ensure config is acceptable by filling in default values for any missing quorum configuration (specifically in the case of a single machine ensemble)
        Throws:
        java.io.IOException