Class QuorumPeerConfig

    • Field Detail

      • sslQuorum

        protected boolean sslQuorum
      • shouldUsePortUnification

        protected boolean shouldUsePortUnification
      • observerMasterPort

        protected int observerMasterPort
      • sslQuorumReloadCertFiles

        protected boolean sslQuorumReloadCertFiles
      • dataDir

        protected File dataDir
      • dataLogDir

        protected File dataLogDir
      • dynamicConfigFileStr

        protected String dynamicConfigFileStr
      • configFileStr

        protected String configFileStr
      • tickTime

        protected int tickTime
      • maxClientCnxns

        protected int maxClientCnxns
      • minSessionTimeout

        protected int minSessionTimeout
        defaults to -1 if not set explicitly
      • maxSessionTimeout

        protected int maxSessionTimeout
        defaults to -1 if not set explicitly
      • metricsProviderClassName

        protected String metricsProviderClassName
      • metricsProviderConfiguration

        protected Properties metricsProviderConfiguration
      • localSessionsEnabled

        protected boolean localSessionsEnabled
      • localSessionsUpgradingEnabled

        protected boolean localSessionsUpgradingEnabled
      • clientPortListenBacklog

        protected int clientPortListenBacklog
        defaults to -1 if not set explicitly
      • initLimit

        protected int initLimit
      • syncLimit

        protected int syncLimit
      • connectToLearnerMasterLimit

        protected int connectToLearnerMasterLimit
      • electionAlg

        protected int electionAlg
      • electionPort

        protected int electionPort
      • quorumListenOnAllIPs

        protected boolean quorumListenOnAllIPs
      • serverId

        protected long serverId
      • lastSeenQuorumVerifier

        protected QuorumVerifier lastSeenQuorumVerifier
      • snapRetainCount

        protected int snapRetainCount
      • purgeInterval

        protected int purgeInterval
      • syncEnabled

        protected boolean syncEnabled
      • initialConfig

        protected String initialConfig
      • quorumServerRequireSasl

        protected boolean quorumServerRequireSasl
        Configurations for the quorumpeer-to-quorumpeer sasl authentication
      • quorumLearnerRequireSasl

        protected boolean quorumLearnerRequireSasl
      • quorumEnableSasl

        protected boolean quorumEnableSasl
      • quorumServicePrincipal

        protected String quorumServicePrincipal
      • quorumLearnerLoginContext

        protected String quorumLearnerLoginContext
      • quorumServerLoginContext

        protected String quorumServerLoginContext
      • quorumCnxnThreadsSize

        protected int quorumCnxnThreadsSize
      • oraclePath

        protected String oraclePath
      • jvmPauseMonitorToRun

        protected boolean jvmPauseMonitorToRun
        JVM Pause Monitor feature switch
      • jvmPauseWarnThresholdMs

        protected long jvmPauseWarnThresholdMs
        JVM Pause Monitor warn threshold in ms
      • jvmPauseInfoThresholdMs

        protected long jvmPauseInfoThresholdMs
        JVM Pause Monitor info threshold in ms
      • jvmPauseSleepTimeMs

        protected long jvmPauseSleepTimeMs
        JVM Pause Monitor sleep time in ms
    • Constructor Detail

      • QuorumPeerConfig

        public QuorumPeerConfig()
    • Method Detail

      • getVersionFromFilename

        public static String getVersionFromFilename​(String filename)
      • writeDynamicConfig

        public static void writeDynamicConfig​(String dynamicConfigFilename,
                                              QuorumVerifier qv,
                                              boolean needKeepVersion)
                                       throws IOException
        Writes dynamic configuration file
        Throws:
        IOException
      • editStaticConfig

        public static void editStaticConfig​(String configFileStr,
                                            String dynamicFileStr,
                                            boolean eraseClientPortAddress)
                                     throws IOException
        Edit static config file. If there are quorum information in static file, e.g. "server.X", "group", it will remove them. If it needs to erase client port information left by the old config, "eraseClientPortAddress" should be set true. It should also updates dynamic file pointer on reconfig.
        Throws:
        IOException
      • deleteFile

        public static void deleteFile​(String filename)
      • getObserverMasterPort

        public int getObserverMasterPort()
      • getDataDir

        public File getDataDir()
      • getDataLogDir

        public File getDataLogDir()
      • getInitialConfig

        public String getInitialConfig()
      • getTickTime

        public int getTickTime()
      • getMaxClientCnxns

        public int getMaxClientCnxns()
      • getMinSessionTimeout

        public int getMinSessionTimeout()
      • getMaxSessionTimeout

        public int getMaxSessionTimeout()
      • getMetricsProviderClassName

        public String getMetricsProviderClassName()
      • getMetricsProviderConfiguration

        public Properties getMetricsProviderConfiguration()
      • areLocalSessionsEnabled

        public boolean areLocalSessionsEnabled()
      • isLocalSessionsUpgradingEnabled

        public boolean isLocalSessionsUpgradingEnabled()
      • isSslQuorum

        public boolean isSslQuorum()
      • shouldUsePortUnification

        public boolean shouldUsePortUnification()
      • getClientPortListenBacklog

        public int getClientPortListenBacklog()
      • getInitLimit

        public int getInitLimit()
      • getSyncLimit

        public int getSyncLimit()
      • getConnectToLearnerMasterLimit

        public int getConnectToLearnerMasterLimit()
      • getElectionAlg

        public int getElectionAlg()
      • getElectionPort

        public int getElectionPort()
      • getSnapRetainCount

        public int getSnapRetainCount()
      • getPurgeInterval

        public int getPurgeInterval()
      • getSyncEnabled

        public boolean getSyncEnabled()
      • getLastSeenQuorumVerifier

        public QuorumVerifier getLastSeenQuorumVerifier()
      • getJvmPauseInfoThresholdMs

        public long getJvmPauseInfoThresholdMs()
      • getJvmPauseWarnThresholdMs

        public long getJvmPauseWarnThresholdMs()
      • getJvmPauseSleepTimeMs

        public long getJvmPauseSleepTimeMs()
      • isJvmPauseMonitorToRun

        public boolean isJvmPauseMonitorToRun()
      • getServerId

        public long getServerId()
      • isDistributed

        public boolean isDistributed()
      • getConfigFilename

        public String getConfigFilename()
      • getQuorumListenOnAllIPs

        public Boolean getQuorumListenOnAllIPs()
      • isMultiAddressEnabled

        public boolean isMultiAddressEnabled()
      • isMultiAddressReachabilityCheckEnabled

        public boolean isMultiAddressReachabilityCheckEnabled()
      • getMultiAddressReachabilityCheckTimeoutMs

        public int getMultiAddressReachabilityCheckTimeoutMs()
      • isStandaloneEnabled

        public static boolean isStandaloneEnabled()
      • setStandaloneEnabled

        public static void setStandaloneEnabled​(boolean enabled)
      • isReconfigEnabled

        public static boolean isReconfigEnabled()
      • setReconfigEnabled

        public static void setReconfigEnabled​(boolean enabled)