public class QuorumPeerConfig
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
QuorumPeerConfig.ConfigException |
Modifier and Type | Field and Description |
---|---|
protected java.net.InetSocketAddress |
clientPortAddress |
protected java.lang.String |
dataDir |
protected java.lang.String |
dataLogDir |
protected int |
electionAlg |
protected int |
electionPort |
protected int |
initLimit |
protected int |
maxClientCnxns |
protected int |
maxSessionTimeout
defaults to -1 if not set explicitly
|
protected int |
minSessionTimeout
defaults to -1 if not set explicitly
|
protected int |
numGroups |
protected java.util.HashMap<java.lang.Long,QuorumPeer.QuorumServer> |
observers |
protected QuorumPeer.LearnerType |
peerType |
protected int |
purgeInterval |
protected int |
quorumCnxnThreadsSize |
protected boolean |
quorumEnableSasl |
protected java.lang.String |
quorumLearnerLoginContext |
protected boolean |
quorumLearnerRequireSasl |
protected boolean |
quorumListenOnAllIPs |
protected java.lang.String |
quorumServerLoginContext |
protected boolean |
quorumServerRequireSasl
Configurations for the quorumpeer-to-quorumpeer sasl authentication
|
protected java.lang.String |
quorumServicePrincipal |
protected QuorumVerifier |
quorumVerifier |
protected java.util.HashMap<java.lang.Long,java.lang.Long> |
serverGroup |
protected long |
serverId |
protected java.util.HashMap<java.lang.Long,QuorumPeer.QuorumServer> |
servers |
protected java.util.HashMap<java.lang.Long,java.lang.Long> |
serverWeight |
protected int |
snapRetainCount |
protected boolean |
syncEnabled |
protected int |
syncLimit |
protected int |
tickTime |
Constructor and Description |
---|
QuorumPeerConfig() |
Modifier and Type | Method and Description |
---|---|
java.net.InetSocketAddress |
getClientPortAddress() |
java.lang.String |
getDataDir() |
java.lang.String |
getDataLogDir() |
int |
getElectionAlg() |
int |
getElectionPort() |
int |
getInitLimit() |
int |
getMaxClientCnxns() |
int |
getMaxSessionTimeout() |
int |
getMinSessionTimeout() |
QuorumPeer.LearnerType |
getPeerType() |
int |
getPurgeInterval() |
java.lang.Boolean |
getQuorumListenOnAllIPs() |
QuorumVerifier |
getQuorumVerifier() |
long |
getServerId() |
java.util.Map<java.lang.Long,QuorumPeer.QuorumServer> |
getServers() |
int |
getSnapRetainCount() |
boolean |
getSyncEnabled() |
int |
getSyncLimit() |
int |
getTickTime() |
boolean |
isDistributed() |
void |
parse(java.lang.String path)
Parse a ZooKeeper configuration file
|
void |
parseProperties(java.util.Properties zkProp)
Parse config from a Properties.
|
protected java.net.InetSocketAddress clientPortAddress
protected java.lang.String dataDir
protected java.lang.String dataLogDir
protected int tickTime
protected int maxClientCnxns
protected int minSessionTimeout
protected int maxSessionTimeout
protected int initLimit
protected int syncLimit
protected int electionAlg
protected int electionPort
protected boolean quorumListenOnAllIPs
protected final java.util.HashMap<java.lang.Long,QuorumPeer.QuorumServer> servers
protected final java.util.HashMap<java.lang.Long,QuorumPeer.QuorumServer> observers
protected long serverId
protected java.util.HashMap<java.lang.Long,java.lang.Long> serverWeight
protected java.util.HashMap<java.lang.Long,java.lang.Long> serverGroup
protected int numGroups
protected QuorumVerifier quorumVerifier
protected int snapRetainCount
protected int purgeInterval
protected boolean syncEnabled
protected QuorumPeer.LearnerType peerType
protected boolean quorumServerRequireSasl
protected boolean quorumLearnerRequireSasl
protected boolean quorumEnableSasl
protected java.lang.String quorumServicePrincipal
protected java.lang.String quorumLearnerLoginContext
protected java.lang.String quorumServerLoginContext
protected int quorumCnxnThreadsSize
public void parse(java.lang.String path) throws QuorumPeerConfig.ConfigException
path
- the patch of the configuration fileQuorumPeerConfig.ConfigException
- error processing configurationpublic void parseProperties(java.util.Properties zkProp) throws java.io.IOException, QuorumPeerConfig.ConfigException
zkProp
- Properties to parse from.java.io.IOException
QuorumPeerConfig.ConfigException
public java.net.InetSocketAddress getClientPortAddress()
public java.lang.String getDataDir()
public java.lang.String getDataLogDir()
public int getTickTime()
public int getMaxClientCnxns()
public int getMinSessionTimeout()
public int getMaxSessionTimeout()
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 java.util.Map<java.lang.Long,QuorumPeer.QuorumServer> getServers()
public long getServerId()
public boolean isDistributed()
public QuorumPeer.LearnerType getPeerType()
public java.lang.Boolean getQuorumListenOnAllIPs()
Copyright © 2019 The Apache Software Foundation