@InterfaceAudience.Public public class QuorumPeerConfig extends Object
Modifier and Type | Class and Description |
---|---|
static class |
QuorumPeerConfig.ConfigException |
Modifier and Type | Field and Description |
---|---|
protected InetSocketAddress |
clientPortAddress |
protected int |
clientPortListenBacklog
defaults to -1 if not set explicitly
|
protected String |
configFileStr |
protected int |
connectToLearnerMasterLimit |
protected File |
dataDir |
protected File |
dataLogDir |
protected String |
dynamicConfigFileStr |
protected int |
electionAlg |
protected int |
electionPort |
protected String |
initialConfig |
protected int |
initLimit |
protected long |
jvmPauseInfoThresholdMs
JVM Pause Monitor info threshold in ms
|
protected boolean |
jvmPauseMonitorToRun
JVM Pause Monitor feature switch
|
protected long |
jvmPauseSleepTimeMs
JVM Pause Monitor sleep time in ms
|
protected long |
jvmPauseWarnThresholdMs
JVM Pause Monitor warn threshold in ms
|
protected QuorumVerifier |
lastSeenQuorumVerifier |
protected boolean |
localSessionsEnabled |
protected boolean |
localSessionsUpgradingEnabled |
protected int |
maxClientCnxns |
protected int |
maxSessionTimeout
defaults to -1 if not set explicitly
|
protected String |
metricsProviderClassName |
protected Properties |
metricsProviderConfiguration |
protected int |
minSessionTimeout
defaults to -1 if not set explicitly
|
static String |
nextDynamicConfigFileSuffix |
protected int |
observerMasterPort |
protected QuorumPeer.LearnerType |
peerType |
protected int |
purgeInterval |
protected int |
quorumCnxnThreadsSize |
protected boolean |
quorumEnableSasl |
protected String |
quorumLearnerLoginContext |
protected boolean |
quorumLearnerRequireSasl |
protected boolean |
quorumListenOnAllIPs |
protected String |
quorumServerLoginContext |
protected boolean |
quorumServerRequireSasl
Configurations for the quorumpeer-to-quorumpeer sasl authentication
|
protected String |
quorumServicePrincipal |
protected QuorumVerifier |
quorumVerifier |
protected InetSocketAddress |
secureClientPortAddress |
protected long |
serverId |
protected boolean |
shouldUsePortUnification |
protected int |
snapRetainCount |
protected boolean |
sslQuorum |
protected boolean |
sslQuorumReloadCertFiles |
protected boolean |
syncEnabled |
protected int |
syncLimit |
protected int |
tickTime |
Constructor and Description |
---|
QuorumPeerConfig() |
public static final String nextDynamicConfigFileSuffix
protected InetSocketAddress clientPortAddress
protected InetSocketAddress secureClientPortAddress
protected boolean sslQuorum
protected boolean shouldUsePortUnification
protected int observerMasterPort
protected boolean sslQuorumReloadCertFiles
protected File dataDir
protected File dataLogDir
protected String dynamicConfigFileStr
protected String configFileStr
protected int tickTime
protected int maxClientCnxns
protected int minSessionTimeout
protected int maxSessionTimeout
protected String metricsProviderClassName
protected Properties metricsProviderConfiguration
protected boolean localSessionsEnabled
protected boolean localSessionsUpgradingEnabled
protected int clientPortListenBacklog
protected int initLimit
protected int syncLimit
protected int connectToLearnerMasterLimit
protected int electionAlg
protected int electionPort
protected boolean quorumListenOnAllIPs
protected long serverId
protected QuorumVerifier quorumVerifier
protected QuorumVerifier lastSeenQuorumVerifier
protected int snapRetainCount
protected int purgeInterval
protected boolean syncEnabled
protected String initialConfig
protected QuorumPeer.LearnerType peerType
protected boolean quorumServerRequireSasl
protected boolean quorumLearnerRequireSasl
protected boolean quorumEnableSasl
protected String quorumServicePrincipal
protected String quorumLearnerLoginContext
protected String quorumServerLoginContext
protected int quorumCnxnThreadsSize
protected boolean jvmPauseMonitorToRun
protected long jvmPauseWarnThresholdMs
protected long jvmPauseInfoThresholdMs
protected long jvmPauseSleepTimeMs
public void parse(String path) throws QuorumPeerConfig.ConfigException
path
- the patch of the configuration fileQuorumPeerConfig.ConfigException
- error processing configurationpublic void parseProperties(Properties zkProp) throws IOException, QuorumPeerConfig.ConfigException
zkProp
- Properties to parse from.IOException
QuorumPeerConfig.ConfigException
public static void configureSSLAuth() throws QuorumPeerConfig.ConfigException
QuorumPeerConfig.ConfigException
- If authentication scheme is configured but authentication
provider is not configured.public static void writeDynamicConfig(String dynamicConfigFilename, QuorumVerifier qv, boolean needKeepVersion) throws IOException
IOException
public static void editStaticConfig(String configFileStr, String dynamicFileStr, boolean eraseClientPortAddress) throws IOException
IOException
public static void deleteFile(String filename)
public static QuorumVerifier parseDynamicConfig(Properties dynamicConfigProp, int eAlg, boolean warnings, boolean configBackwardCompatibilityMode) throws IOException, QuorumPeerConfig.ConfigException
dynamicConfigProp
- Properties to parse from.IOException
QuorumPeerConfig.ConfigException
public void checkValidity() throws IOException, QuorumPeerConfig.ConfigException
public InetSocketAddress getClientPortAddress()
public InetSocketAddress getSecureClientPortAddress()
public int getObserverMasterPort()
public File getDataDir()
public File getDataLogDir()
public String getInitialConfig()
public int getTickTime()
public int getMaxClientCnxns()
public int getMinSessionTimeout()
public int getMaxSessionTimeout()
public String getMetricsProviderClassName()
public Properties getMetricsProviderConfiguration()
public boolean areLocalSessionsEnabled()
public boolean isLocalSessionsUpgradingEnabled()
public boolean isSslQuorum()
public boolean shouldUsePortUnification()
public int getClientPortListenBacklog()
public int getInitLimit()
public int getSyncLimit()
public int getConnectToLearnerMasterLimit()
public int getElectionAlg()
public int getElectionPort()
public int getSnapRetainCount()
public int getPurgeInterval()
public boolean getSyncEnabled()
public QuorumVerifier getQuorumVerifier()
public QuorumVerifier getLastSeenQuorumVerifier()
public Map<Long,QuorumPeer.QuorumServer> getServers()
public long getJvmPauseInfoThresholdMs()
public long getJvmPauseWarnThresholdMs()
public long getJvmPauseSleepTimeMs()
public boolean isJvmPauseMonitorToRun()
public long getServerId()
public boolean isDistributed()
public QuorumPeer.LearnerType getPeerType()
public String getConfigFilename()
public Boolean getQuorumListenOnAllIPs()
public boolean isMultiAddressEnabled()
public boolean isMultiAddressReachabilityCheckEnabled()
public int getMultiAddressReachabilityCheckTimeoutMs()
public static boolean isStandaloneEnabled()
public static void setStandaloneEnabled(boolean enabled)
public static boolean isReconfigEnabled()
public static void setReconfigEnabled(boolean enabled)
Copyright © 2008–2021 The Apache Software Foundation. All rights reserved.