ZooKeeper configuration parameters

To configure the service, use the following configuration parameters in ADCM.

NOTE
  • Some of the parameters become visible in the ADCM UI after the Advanced flag has been set.

  • The parameters that are set in the Custom group will overwrite the existing parameters even if they are read-only.

Main
Parameter Description Default value

connect

ZooKeeper connection string used by other services or clusters. It is generated automatically

 — 

dataDir

Location where ZooKeeper stores the in-memory database snapshots and, unless specified otherwise, the transaction log of updates to the database

/var/lib/zookeeper

zoo.cfg
Parameter Description Default value

clientPort

Port to listen for client connections, that is the port that clients attempt to connect to

2181

admin.serverPort

Embedded Jetty server port

5181

admin.enableServer

Enables the AdminServer, which is an embedded Jetty server that provides an HTTP interface to the four-letter-word commands. Set to false to use the system property

false

tickTime

Basic time unit used by ZooKeeper (in milliseconds). It is used for heartbeats. The minimum session timeout will be twice the tickTime

2000

initLimit

Timeouts that ZooKeeper uses to limit the length of the time for ZooKeeper servers in quorum to connect to the leader

5

syncLimit

Defines the maximum date skew between server and the leader

2

maxClientCnxns

This property limits the number of active connections from the host, specified by IP address, to a single ZooKeeper Server

0

autopurge.snapRetainCount

When enabled, ZooKeeper auto-purge feature retains the autopurge.snapRetainCount most recent snapshots and the corresponding transaction logs in the dataDir and dataLogDir respectively and deletes the rest. The minimum value is 3

3

autopurge.purgeInterval

Time interval, for which the purge task has to be triggered (in hours). Set to a positive integer (1 and above) to enable the auto-purging

24

Add key,value

In this section you can define values for custom parameters that are not displayed in ADCM UI, but are allowed in the configuration file zoo.cfg

 — 

SSl configuration
Parameter Description Default value

sslQuorum

Enables encrypted quorum communication

false

serverCnxnFactory

Specifies ServerCnxnFactory implementation. This should be set to NettyServerCnxnFactory in order to use TLS-based server communication

org.apache.zookeeper.server.NettyServerCnxnFactory

ssl.quorum.keyStore.location

Specifies the absolute path to the server keystore file (for example: /etc/zookeeper/ssl/keystore.jks)

 — 

ssl.quorum.keyStore.password

Specifies the password used when the keystore was created

 — 

ssl.quorum.trustStore.location

Specifies the absolute path to the server truststore file (for example: /etc/zookeeper/ssl/truststore.jks)

 — 

ssl.quorum.trustStore.password

Specifies the password used when the truststore is created

 — 

ssl.protocol

Specifies the protocol to be used in client TLS negotiation

TLSv1.2

ssl.quorum.protocol

Specifies the protocol to be used in quorum TLS negotiation

TLSv1.2

Parameter Description Default value

Myid matching

A mapping of the quorum hosts to internal ZooKeeper IDs

 — 

zookeeper-env.sh
Parameter Description Default value

ZOO_LOG_DIR

The directory to store logs

/var/log/zookeeper

ZOOPIDFILE

The directory to store the ZooKeeper process ID

/var/run/zookeeper/zookeeper_server.pid

SERVER_JVMFLAGS

Used for setting different JVM parameters connected, for example, with garbage collecting

-Xmx1024m

JAVA

A path to Java

$JAVA_HOME/bin/java

logback.xml template

Used for setting the logging level and defines which log appenders to turn on. Enabling the log appender CONSOLE directs logs to stdout. Enabling ROLLINGFILE creates the zookeeper.log file, then this file gets rotated, and expired

 — 

Found a mistake? Seleсt text and press Ctrl+Enter to report it