@InterfaceAudience.Public public class QuorumPeerConfig extends Object
Modifier and Type | Class and Description |
---|---|
static class |
QuorumPeerConfig.ConfigException |
Constructor and Description |
---|
QuorumPeerConfig() |
public static final String nextDynamicConfigFileSuffix
protected InetSocketAddress clientPortAddress
protected InetSocketAddress secureClientPortAddress
protected boolean sslQuorum
protected boolean shouldUsePortUnification
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 boolean localSessionsEnabled
protected boolean localSessionsUpgradingEnabled
protected int initLimit
protected int syncLimit
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 QuorumPeer.LearnerType peerType
protected boolean quorumServerRequireSasl
protected boolean quorumLearnerRequireSasl
protected boolean quorumEnableSasl
protected String quorumServicePrincipal
protected String quorumLearnerLoginContext
protected String quorumServerLoginContext
protected int quorumCnxnThreadsSize
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 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 File getDataDir()
public File getDataLogDir()
public int getTickTime()
public int getMaxClientCnxns()
public int getMinSessionTimeout()
public int getMaxSessionTimeout()
public boolean areLocalSessionsEnabled()
public boolean isLocalSessionsUpgradingEnabled()
public boolean isSslQuorum()
public boolean shouldUsePortUnification()
public int getInitLimit()
public int getSyncLimit()
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 getServerId()
public boolean isDistributed()
public QuorumPeer.LearnerType getPeerType()
public String getConfigFilename()
public Boolean getQuorumListenOnAllIPs()
public static boolean isStandaloneEnabled()
public static void setStandaloneEnabled(boolean enabled)
public static boolean isReconfigEnabled()
public static void setReconfigEnabled(boolean enabled)
Copyright © 2008–2019 The Apache Software Foundation. All rights reserved.