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.QuorumPeerConfig
QuorumPeerConfig.ConfigException
-
-
Field Summary
Fields Modifier and Type Field Description static String
CLIENT_PORT_KEY
static String
CONTROLLER_PORT_KEY
-
Fields 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
Constructors 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 Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
ensureComplete()
Ensure config is acceptable by filling in default values for any missing quorum configuration (specifically in the case of a single machine ensemble)InetSocketAddress
getControllerAddress()
ServerConfig
getZooKeeperServerConfig()
void
parse(String configFile)
Parse a ZooKeeper configuration file-
Methods 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 Detail
-
CONTROLLER_PORT_KEY
public static final String CONTROLLER_PORT_KEY
- See Also:
- Constant Field Values
-
CLIENT_PORT_KEY
public static final String CLIENT_PORT_KEY
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ControllerServerConfig
public 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
-
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
public 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
-
getControllerAddress
public InetSocketAddress getControllerAddress()
-
getZooKeeperServerConfig
public ServerConfig getZooKeeperServerConfig()
-
parse
public void parse(String configFile) throws QuorumPeerConfig.ConfigException
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
public void ensureComplete() throws 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:
IOException
-
-