Class ControllerServerConfig
- java.lang.Object
- 
- org.apache.zookeeper.server.quorum.QuorumPeerConfig
- 
- org.apache.zookeeper.server.controller.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.
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from class org.apache.zookeeper.server.quorum.QuorumPeerConfigQuorumPeerConfig.ConfigException
 
- 
 - 
Field SummaryFields Modifier and Type Field Description static StringCLIENT_PORT_KEYstatic StringCONTROLLER_PORT_KEY- 
Fields inherited from class org.apache.zookeeper.server.quorum.QuorumPeerConfigclientPortAddress, clientPortListenBacklog, configFileStr, connectToLearnerMasterLimit, dataDir, dataLogDir, dynamicConfigFileStr, electionAlg, electionPort, initialConfig, initLimit, jvmPauseInfoThresholdMs, jvmPauseMonitorToRun, jvmPauseSleepTimeMs, jvmPauseWarnThresholdMs, lastSeenQuorumVerifier, localSessionsEnabled, localSessionsUpgradingEnabled, maxClientCnxns, maxSessionTimeout, metricsProviderClassName, metricsProviderConfiguration, minSessionTimeout, nextDynamicConfigFileSuffix, observerMasterPort, oraclePath, peerType, purgeInterval, quorumCnxnThreadsSize, quorumEnableSasl, quorumLearnerLoginContext, quorumLearnerRequireSasl, quorumListenOnAllIPs, quorumServerLoginContext, quorumServerRequireSasl, quorumServicePrincipal, quorumVerifier, secureClientPortAddress, serverId, shouldUsePortUnification, snapRetainCount, sslQuorum, sslQuorumReloadCertFiles, syncEnabled, syncLimit, tickTime
 
- 
 - 
Constructor SummaryConstructors Constructor Description ControllerServerConfig(int controllerPort, int zkServerPort, String dataDirPath)Instantiate a config object with required parameters.ControllerServerConfig(String configFile)Instantiate a new config via a zk config file.ControllerServerConfig(InetAddress hostAddress, int controllerPort, int zkServerPort, String dataDirPath)Instantiate a config object with required parameters.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidensureComplete()Ensure config is acceptable by filling in default values for any missing quorum configuration (specifically in the case of a single machine ensemble)InetSocketAddressgetControllerAddress()ServerConfiggetZooKeeperServerConfig()voidparse(String configFile)Parse a ZooKeeper configuration file- 
Methods inherited from class org.apache.zookeeper.server.quorum.QuorumPeerConfigareLocalSessionsEnabled, checkValidity, configureSSLAuth, deleteFile, editStaticConfig, getClientPortAddress, getClientPortListenBacklog, getConfigFilename, getConnectToLearnerMasterLimit, getDataDir, getDataLogDir, getElectionAlg, getElectionPort, getInitialConfig, getInitLimit, getJvmPauseInfoThresholdMs, getJvmPauseSleepTimeMs, getJvmPauseWarnThresholdMs, getLastSeenQuorumVerifier, getMaxClientCnxns, getMaxSessionTimeout, getMetricsProviderClassName, getMetricsProviderConfiguration, getMinSessionTimeout, getMultiAddressReachabilityCheckTimeoutMs, getObserverMasterPort, getPeerType, getPurgeInterval, getQuorumListenOnAllIPs, getQuorumVerifier, getSecureClientPortAddress, getServerId, getServers, getSnapRetainCount, getSyncEnabled, getSyncLimit, getTickTime, getVersionFromFilename, isDistributed, isJvmPauseMonitorToRun, isLocalSessionsUpgradingEnabled, isMultiAddressEnabled, isMultiAddressReachabilityCheckEnabled, isReconfigEnabled, isSslQuorum, isStandaloneEnabled, parseDynamicConfig, parseProperties, setReconfigEnabled, setStandaloneEnabled, shouldUsePortUnification, writeDynamicConfig
 
- 
 
- 
- 
- 
Field Detail- 
CONTROLLER_PORT_KEYpublic static final String CONTROLLER_PORT_KEY - See Also:
- Constant Field Values
 
 - 
CLIENT_PORT_KEYpublic static final String CLIENT_PORT_KEY - See Also:
- Constant Field Values
 
 
- 
 - 
Constructor Detail- 
ControllerServerConfigpublic ControllerServerConfig(String configFile) throws QuorumPeerConfig.ConfigException Instantiate a new config via a zk config file.- Parameters:
- configFile- path to the configuration file
- Throws:
- QuorumPeerConfig.ConfigException
 
 - 
ControllerServerConfigpublic ControllerServerConfig(InetAddress hostAddress, int controllerPort, int zkServerPort, 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.
 
 - 
ControllerServerConfigpublic ControllerServerConfig(int controllerPort, int zkServerPort, 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- 
getControllerAddresspublic InetSocketAddress getControllerAddress() 
 - 
getZooKeeperServerConfigpublic ServerConfig getZooKeeperServerConfig() 
 - 
parsepublic void parse(String configFile) throws QuorumPeerConfig.ConfigException Description copied from class:QuorumPeerConfigParse a ZooKeeper configuration file- Overrides:
- parsein class- QuorumPeerConfig
- Parameters:
- configFile- the patch of the configuration file
- Throws:
- QuorumPeerConfig.ConfigException- error processing configuration
 
 - 
ensureCompletepublic void ensureComplete() throws IOExceptionEnsure config is acceptable by filling in default values for any missing quorum configuration (specifically in the case of a single machine ensemble)- Throws:
- IOException
 
 
- 
 
-