ZooKeeper configuration parameters
To configure the service, use the following configuration parameters in ADCM.
|
NOTE
|
| Parameter | Description | Default value |
|---|---|---|
connect |
ZooKeeper connection string that is 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 |
admin.serverPort |
Port that listens on the embedded Jetty server. Jetty server provides an HTTP interface to the four letter word commands |
58080 |
| Parameter | Description | Default value |
|---|---|---|
clientPort |
Port for Client connections, i.e. the port that Clients attempt to connect to |
2181 |
metricsHttpPort |
Port to listen for metric connections |
7000 |
tickTime |
Base unit of time used by ZooKeeper. The minimum session timeout becomes twice the |
2000 |
initLimit |
Timeouts, ZooKeeper uses to limit the length of the time that the ZooKeeper Servers in Quorum have to connect to the Leader |
5 |
syncLimit |
How far out of date each Server can be from the Leader |
2 |
maxClientCnxns |
Limits the number of active connections from the host, specified by IP address, to a single ZooKeeper Server |
0 |
autopurge.snapRetainCount |
Enables storing the most recent snapshots and related transaction logs in dataDir and dataLogDir respectively, and deleting the rest. The minimum value is |
3 |
autopurge.purgeInterval |
Time interval in hours between runs of the purge task. Set to a positive integer ( |
24 |
Add key, value |
Parameters and their values entered in this field override the parameters specified in the ADCM user interface. This field also allows you to set values for all user parameters that are not displayed in the interface, but are allowed in the configuration file zoo.cfg |
— |
4lw.commands.whitelist |
List of Four Letter Words commands, separated by commas, is used to provide flexible control over the set of commands that ZooKeeper can execute. By default, it contains all supported Four Letter Words commands except |
— |
| Parameter | Description | Default value |
|---|---|---|
JAVA |
Path to Java |
$JAVA_HOME/bin/java |
ZOOPIDFILE |
Directory to store the ZooKeeper process ID |
/var/run/zookeeper/zookeeper_server.pid |
ZOO_LOG_DIR |
Directory to store the logs |
/var/log/zookeeper |
SERVER_JVMFLAGS |
It is used for setting different JVM parameters connected, for example, with garbage collecting |
-Xmx1024m |
Add property |
Parameters and their values entered in this field override the parameters specified in the ADCM user interface. This field also allows you to set values for all user parameters that are not displayed in the interface, but are allowed in the configuration file zookeeper-env.sh |
— |
| Parameter | Description | Default value |
|---|---|---|
jmx_port |
Port to which JMX metrics are sent |
9994 |
JMX Exporter Port |
Port for connecting to Prometheus JMX Exporter |
11208 |
Enables authentication for JMX in the service (used when access to the JMX port needs to be protected).
| Parameter | Description | Default value |
|---|---|---|
Username |
Username for authentication in JMX |
monitoring |
Password |
User password for authentication in JMX |
— |
| Parameter | Description | Default value |
|---|---|---|
Interval_sec |
Interval in seconds between checks |
1 |
Retries |
Max number of checks |
30 |
Safety checks |
Enables server check during rolling restart |
true |
Zookeeper Server component configuration parameters:
A custom configuration template for the logback.xml file for ZooKeeper.
Default value:
<!--
Copyright 2022 The Apache Software Foundation
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Define some default values that can be overridden by system properties
-->
<configuration>
<!-- Uncomment this if you would like to expose Logback JMX beans -->
<!--jmxConfigurator /-->
<property name="zookeeper.console.threshold" value="INFO" />
<property name="zookeeper.log.threshold" value="INFO" />
<property name="zookeeper.log.maxfilesize" value="256MB" />
<property name="zookeeper.log.maxbackupindex" value="20" />
<!--
console
Add "console" to root logger if you want to use this
-->
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{ISO8601} [myid:%X{myid}] - %-5p [%t:%C{1}@%L] - %m%n</pattern>
</encoder>
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<level>${zookeeper.console.threshold}</level>
</filter>
</appender>
<!--
Add ROLLINGFILE to root logger to get log file output
-->
<appender name="ROLLINGFILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<File>${zookeeper.log.dir}/${zookeeper.log.file}</File>
<encoder>
<pattern>%d{ISO8601} [myid:%X{myid}] - %-5p [%t:%C{1}@%L] - %m%n</pattern>
</encoder>
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<level>${zookeeper.log.threshold}</level>
</filter>
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
<maxIndex>${zookeeper.log.maxbackupindex}</maxIndex>
<FileNamePattern>${zookeeper.log.dir}/${zookeeper.log.file}.%i</FileNamePattern>
</rollingPolicy>
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
<MaxFileSize>${zookeeper.log.maxfilesize}</MaxFileSize>
</triggeringPolicy>
</appender>
<root level="INFO">
<appender-ref ref="ROLLINGFILE" />
<appender-ref ref="CONSOLE" />
</root>
</configuration>