Class ControllerServerConfig
java.lang.Object
org.apache.zookeeper.server.quorum.QuorumPeerConfig
org.apache.zookeeper.server.controller.ControllerServerConfig
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.QuorumPeerConfig
QuorumPeerConfig.ConfigException
-
Field Summary
FieldsFields inherited from class org.apache.zookeeper.server.quorum.QuorumPeerConfig
clientPortAddress, 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 Summary
ConstructorsConstructorDescriptionControllerServerConfig
(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 Summary
Modifier and TypeMethodDescriptionvoid
Ensure config is acceptable by filling in default values for any missing quorum configuration (specifically in the case of a single machine ensemble)void
Parse a ZooKeeper configuration fileMethods inherited from class org.apache.zookeeper.server.quorum.QuorumPeerConfig
areLocalSessionsEnabled, 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 Details
-
CONTROLLER_PORT_KEY
- See Also:
-
CLIENT_PORT_KEY
- See Also:
-
-
Constructor Details
-
ControllerServerConfig
Instantiate a new config via a zk config file.- Parameters:
configFile
- path to the configuration file- Throws:
QuorumPeerConfig.ConfigException
-
ControllerServerConfig
public 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.
-
ControllerServerConfig
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 Details
-
getControllerAddress
-
getZooKeeperServerConfig
-
parse
Description copied from class:QuorumPeerConfig
Parse a ZooKeeper configuration file- Overrides:
parse
in classQuorumPeerConfig
- Parameters:
configFile
- the patch of the configuration file- Throws:
QuorumPeerConfig.ConfigException
- error processing configuration
-
ensureComplete
Ensure config is acceptable by filling in default values for any missing quorum configuration (specifically in the case of a single machine ensemble)- Throws:
IOException
-