This is an automated email from the ASF dual-hosted git repository.

chia7712 pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/kafka.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 085b27ec6e6 KAFKA-17987 Remove assorted ZK-related files (#17768)
085b27ec6e6 is described below

commit 085b27ec6e65565cd41336b14aed2824a6e154db
Author: Colin Patrick McCabe <[email protected]>
AuthorDate: Wed Nov 13 04:32:18 2024 -0800

    KAFKA-17987 Remove assorted ZK-related files (#17768)
    
    Remove zookeeper files in bin:
    - bin/zookeeper-security-migration.sh
    - bin/zookeeper-server-start.sh
    - bin/zookeeper-server-stop.sh
    - bin/zookeeper-shell.sh
    
    Remove files used to configure Kafka in zookeeper mode in config:
    - config/server.properties
    - config/zookeeper.properties
    
    Remove ZK references from all remaining Kafka configuration files.
    
    Remove ZK references from all log4j.properties files.
    
    Reviewers: Chia-Ping Tsai <[email protected]>
---
 bin/zookeeper-security-migration.sh                |  17 ---
 bin/zookeeper-server-start.sh                      |  44 -------
 bin/zookeeper-server-stop.sh                       |  35 ------
 bin/zookeeper-shell.sh                             |  23 ----
 config/kraft/broker.properties                     |   5 -
 config/kraft/controller.properties                 |   5 -
 config/kraft/reconfig-server.properties            |   5 -
 config/kraft/server.properties                     |   5 -
 config/log4j.properties                            |   3 -
 config/server.properties                           | 138 ---------------------
 config/zookeeper.properties                        |  24 ----
 core/src/test/resources/log4j.properties           |   3 -
 .../src/test/resources/log4j.properties            |   1 -
 metadata/src/test/resources/log4j.properties       |   1 -
 .../src/test/resources/log4j.properties            |   1 -
 streams/src/test/resources/log4j.properties        |   1 -
 16 files changed, 311 deletions(-)

diff --git a/bin/zookeeper-security-migration.sh 
b/bin/zookeeper-security-migration.sh
deleted file mode 100755
index 722bde7cc4c..00000000000
--- a/bin/zookeeper-security-migration.sh
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/bin/bash
-# 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.
-
-exec $(dirname $0)/kafka-run-class.sh kafka.admin.ZkSecurityMigrator "$@"
diff --git a/bin/zookeeper-server-start.sh b/bin/zookeeper-server-start.sh
deleted file mode 100755
index bd9c1142817..00000000000
--- a/bin/zookeeper-server-start.sh
+++ /dev/null
@@ -1,44 +0,0 @@
-#!/bin/bash
-# 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.
-
-if [ $# -lt 1 ];
-then
-       echo "USAGE: $0 [-daemon] zookeeper.properties"
-       exit 1
-fi
-base_dir=$(dirname $0)
-
-if [ "x$KAFKA_LOG4J_OPTS" = "x" ]; then
-    export 
KAFKA_LOG4J_OPTS="-Dlog4j.configuration=file:$base_dir/../config/log4j.properties"
-fi
-
-if [ "x$KAFKA_HEAP_OPTS" = "x" ]; then
-    export KAFKA_HEAP_OPTS="-Xmx512M -Xms512M"
-fi
-
-EXTRA_ARGS=${EXTRA_ARGS-'-name zookeeper -loggc'}
-
-COMMAND=$1
-case $COMMAND in
-  -daemon)
-     EXTRA_ARGS="-daemon "$EXTRA_ARGS
-     shift
-     ;;
- *)
-     ;;
-esac
-
-exec $base_dir/kafka-run-class.sh $EXTRA_ARGS 
org.apache.zookeeper.server.quorum.QuorumPeerMain "$@"
diff --git a/bin/zookeeper-server-stop.sh b/bin/zookeeper-server-stop.sh
deleted file mode 100755
index 11665f32707..00000000000
--- a/bin/zookeeper-server-stop.sh
+++ /dev/null
@@ -1,35 +0,0 @@
-#!/bin/bash
-# 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.
-SIGNAL=${SIGNAL:-TERM}
-
-OSNAME=$(uname -s)
-if [[ "$OSNAME" == "OS/390" ]]; then
-    if [ -z $JOBNAME ]; then
-        JOBNAME="ZKEESTRT"
-    fi
-    PIDS=$(ps -A -o pid,jobname,comm | grep -i $JOBNAME | grep java | grep -v 
grep | awk '{print $1}')
-elif [[ "$OSNAME" == "OS400" ]]; then
-    PIDS=$(ps -Af | grep java | grep -i QuorumPeerMain | grep -v grep | awk 
'{print $2}')
-else
-    PIDS=$(ps ax | grep java | grep -i QuorumPeerMain | grep -v grep | awk 
'{print $1}')
-fi
-
-if [ -z "$PIDS" ]; then
-  echo "No zookeeper server to stop"
-  exit 1
-else
-  kill -s $SIGNAL $PIDS
-fi
diff --git a/bin/zookeeper-shell.sh b/bin/zookeeper-shell.sh
deleted file mode 100755
index 2f1d0f2c616..00000000000
--- a/bin/zookeeper-shell.sh
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/bash
-# 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.
-
-if [ $# -lt 1 ];
-then
-       echo "USAGE: $0 zookeeper_host:port[/path] [-zk-tls-config-file file] 
[args...]"
-       exit 1
-fi
-
-exec $(dirname $0)/kafka-run-class.sh 
org.apache.zookeeper.ZooKeeperMainWithTlsSupportForKafka -server "$@"
diff --git a/config/kraft/broker.properties b/config/kraft/broker.properties
index c1b1d084dbc..61a536c9b30 100644
--- a/config/kraft/broker.properties
+++ b/config/kraft/broker.properties
@@ -13,11 +13,6 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-#
-# This configuration file is intended for use in KRaft mode, where
-# Apache ZooKeeper is not present.
-#
-
 ############################# Server Basics #############################
 
 # The role of this server. Setting this puts us in KRaft mode
diff --git a/config/kraft/controller.properties 
b/config/kraft/controller.properties
index c1d9ff78682..84963c95701 100644
--- a/config/kraft/controller.properties
+++ b/config/kraft/controller.properties
@@ -13,11 +13,6 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-#
-# This configuration file is intended for use in KRaft mode, where
-# Apache ZooKeeper is not present.
-#
-
 ############################# Server Basics #############################
 
 # The role of this server. Setting this puts us in KRaft mode
diff --git a/config/kraft/reconfig-server.properties 
b/config/kraft/reconfig-server.properties
index a0a25133e82..ae1dfb1606b 100644
--- a/config/kraft/reconfig-server.properties
+++ b/config/kraft/reconfig-server.properties
@@ -13,11 +13,6 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-#
-# This configuration file is intended for use in KRaft mode, where
-# Apache ZooKeeper is not present.
-#
-
 ############################# Server Basics #############################
 
 # The role of this server. Setting this puts us in KRaft mode
diff --git a/config/kraft/server.properties b/config/kraft/server.properties
index 34bef2f9c90..2d2c0bf8aff 100644
--- a/config/kraft/server.properties
+++ b/config/kraft/server.properties
@@ -13,11 +13,6 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-#
-# This configuration file is intended for use in KRaft mode, where
-# Apache ZooKeeper is not present.
-#
-
 ############################# Server Basics #############################
 
 # The role of this server. Setting this puts us in KRaft mode
diff --git a/config/log4j.properties b/config/log4j.properties
index 4dbdd83f83b..bcf2b9daa4e 100644
--- a/config/log4j.properties
+++ b/config/log4j.properties
@@ -57,9 +57,6 @@ 
log4j.appender.authorizerAppender.File=${kafka.logs.dir}/kafka-authorizer.log
 log4j.appender.authorizerAppender.layout=org.apache.log4j.PatternLayout
 log4j.appender.authorizerAppender.layout.ConversionPattern=[%d] %p %m (%c)%n
 
-# Change the line below to adjust ZK client logging
-log4j.logger.org.apache.zookeeper=INFO
-
 # Change the two lines below to adjust the general broker logging level 
(output to server.log and stdout)
 log4j.logger.kafka=INFO
 log4j.logger.org.apache.kafka=INFO
diff --git a/config/server.properties b/config/server.properties
deleted file mode 100644
index 21ba1c7d9c6..00000000000
--- a/config/server.properties
+++ /dev/null
@@ -1,138 +0,0 @@
-# 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.
-
-#
-# This configuration file is intended for use in ZK-based mode, where Apache 
ZooKeeper is required.
-# See kafka.server.KafkaConfig for additional details and defaults
-#
-
-############################# Server Basics #############################
-
-# The id of the broker. This must be set to a unique integer for each broker.
-broker.id=0
-
-############################# Socket Server Settings 
#############################
-
-# The address the socket server listens on. If not configured, the host name 
will be equal to the value of
-# java.net.InetAddress.getCanonicalHostName(), with PLAINTEXT listener name, 
and port 9092.
-#   FORMAT:
-#     listeners = listener_name://host_name:port
-#   EXAMPLE:
-#     listeners = PLAINTEXT://your.host.name:9092
-#listeners=PLAINTEXT://:9092
-
-# Listener name, hostname and port the broker will advertise to clients.
-# If not set, it uses the value for "listeners".
-#advertised.listeners=PLAINTEXT://your.host.name:9092
-
-# Maps listener names to security protocols, the default is for them to be the 
same. See the config documentation for more details
-#listener.security.protocol.map=PLAINTEXT:PLAINTEXT,SSL:SSL,SASL_PLAINTEXT:SASL_PLAINTEXT,SASL_SSL:SASL_SSL
-
-# The number of threads that the server uses for receiving requests from the 
network and sending responses to the network
-num.network.threads=3
-
-# The number of threads that the server uses for processing requests, which 
may include disk I/O
-num.io.threads=8
-
-# The send buffer (SO_SNDBUF) used by the socket server
-socket.send.buffer.bytes=102400
-
-# The receive buffer (SO_RCVBUF) used by the socket server
-socket.receive.buffer.bytes=102400
-
-# The maximum size of a request that the socket server will accept (protection 
against OOM)
-socket.request.max.bytes=104857600
-
-
-############################# Log Basics #############################
-
-# A comma separated list of directories under which to store log files
-log.dirs=/tmp/kafka-logs
-
-# The default number of log partitions per topic. More partitions allow greater
-# parallelism for consumption, but this will also result in more files across
-# the brokers.
-num.partitions=1
-
-# The number of threads per data directory to be used for log recovery at 
startup and flushing at shutdown.
-# This value is recommended to be increased for installations with data dirs 
located in RAID array.
-num.recovery.threads.per.data.dir=1
-
-############################# Internal Topic Settings  
#############################
-# The replication factor for the group metadata internal topics 
"__consumer_offsets" and "__transaction_state"
-# For anything other than development testing, a value greater than 1 is 
recommended to ensure availability such as 3.
-offsets.topic.replication.factor=1
-transaction.state.log.replication.factor=1
-transaction.state.log.min.isr=1
-
-############################# Log Flush Policy #############################
-
-# Messages are immediately written to the filesystem but by default we only 
fsync() to sync
-# the OS cache lazily. The following configurations control the flush of data 
to disk.
-# There are a few important trade-offs here:
-#    1. Durability: Unflushed data may be lost if you are not using 
replication.
-#    2. Latency: Very large flush intervals may lead to latency spikes when 
the flush does occur as there will be a lot of data to flush.
-#    3. Throughput: The flush is generally the most expensive operation, and a 
small flush interval may lead to excessive seeks.
-# The settings below allow one to configure the flush policy to flush data 
after a period of time or
-# every N messages (or both). This can be done globally and overridden on a 
per-topic basis.
-
-# The number of messages to accept before forcing a flush of data to disk
-#log.flush.interval.messages=10000
-
-# The maximum amount of time a message can sit in a log before we force a flush
-#log.flush.interval.ms=1000
-
-############################# Log Retention Policy 
#############################
-
-# The following configurations control the disposal of log segments. The 
policy can
-# be set to delete segments after a period of time, or after a given size has 
accumulated.
-# A segment will be deleted whenever *either* of these criteria are met. 
Deletion always happens
-# from the end of the log.
-
-# The minimum age of a log file to be eligible for deletion due to age
-log.retention.hours=168
-
-# A size-based retention policy for logs. Segments are pruned from the log 
unless the remaining
-# segments drop below log.retention.bytes. Functions independently of 
log.retention.hours.
-#log.retention.bytes=1073741824
-
-# The maximum size of a log segment file. When this size is reached a new log 
segment will be created.
-#log.segment.bytes=1073741824
-
-# The interval at which log segments are checked to see if they can be deleted 
according
-# to the retention policies
-log.retention.check.interval.ms=300000
-
-############################# Zookeeper #############################
-
-# Zookeeper connection string (see zookeeper docs for details).
-# This is a comma separated host:port pairs, each corresponding to a zk
-# server. e.g. "127.0.0.1:3000,127.0.0.1:3001,127.0.0.1:3002".
-# You can also append an optional chroot string to the urls to specify the
-# root directory for all kafka znodes.
-zookeeper.connect=localhost:2181
-
-# Timeout in ms for connecting to zookeeper
-zookeeper.connection.timeout.ms=18000
-
-
-############################# Group Coordinator Settings 
#############################
-
-# The following configuration specifies the time, in milliseconds, that the 
GroupCoordinator will delay the initial consumer rebalance.
-# The rebalance will be further delayed by the value of 
group.initial.rebalance.delay.ms as new members join the group, up to a maximum 
of max.poll.interval.ms.
-# The default value for this is 3 seconds.
-# We override this to 0 here as it makes for a better out-of-the-box 
experience for development and testing.
-# However, in production environments the default value of 3 seconds is more 
suitable as this will help to avoid unnecessary, and potentially expensive, 
rebalances during application startup.
-group.initial.rebalance.delay.ms=0
diff --git a/config/zookeeper.properties b/config/zookeeper.properties
deleted file mode 100644
index 90f4332ec31..00000000000
--- a/config/zookeeper.properties
+++ /dev/null
@@ -1,24 +0,0 @@
-# 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.
-# the directory where the snapshot is stored.
-dataDir=/tmp/zookeeper
-# the port at which the clients will connect
-clientPort=2181
-# disable the per-ip limit on the number of connections since this is a 
non-production config
-maxClientCnxns=0
-# Disable the adminserver by default to avoid port conflicts.
-# Set the port to something non-conflicting if choosing to enable this
-admin.enableServer=false
-# admin.serverPort=8080
diff --git a/core/src/test/resources/log4j.properties 
b/core/src/test/resources/log4j.properties
index b265ee9cdaa..833d63e1e8e 100644
--- a/core/src/test/resources/log4j.properties
+++ b/core/src/test/resources/log4j.properties
@@ -20,6 +20,3 @@ log4j.appender.stdout.layout.ConversionPattern=[%d] %p %m 
(%c:%L)%n
 
 log4j.logger.kafka=WARN
 log4j.logger.org.apache.kafka=WARN
-
-# zkclient can be verbose, during debugging it is common to adjust it 
separately
-log4j.logger.org.apache.zookeeper=WARN
diff --git a/group-coordinator/src/test/resources/log4j.properties 
b/group-coordinator/src/test/resources/log4j.properties
index db3879386f1..9c8357947d9 100644
--- a/group-coordinator/src/test/resources/log4j.properties
+++ b/group-coordinator/src/test/resources/log4j.properties
@@ -19,4 +19,3 @@ log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
 log4j.appender.stdout.layout.ConversionPattern=[%d] %p %m (%c:%L)%n
 
 log4j.logger.org.apache.kafka=DEBUG
-log4j.logger.org.apache.zookeeper=WARN
diff --git a/metadata/src/test/resources/log4j.properties 
b/metadata/src/test/resources/log4j.properties
index db3879386f1..9c8357947d9 100644
--- a/metadata/src/test/resources/log4j.properties
+++ b/metadata/src/test/resources/log4j.properties
@@ -19,4 +19,3 @@ log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
 log4j.appender.stdout.layout.ConversionPattern=[%d] %p %m (%c:%L)%n
 
 log4j.logger.org.apache.kafka=DEBUG
-log4j.logger.org.apache.zookeeper=WARN
diff --git a/streams/integration-tests/src/test/resources/log4j.properties 
b/streams/integration-tests/src/test/resources/log4j.properties
index b7e1fb2d60e..104b46df20f 100644
--- a/streams/integration-tests/src/test/resources/log4j.properties
+++ b/streams/integration-tests/src/test/resources/log4j.properties
@@ -21,7 +21,6 @@ log4j.appender.stdout.layout.ConversionPattern=[%d] %p %m 
(%c:%L)%n
 log4j.logger.kafka=ERROR
 log4j.logger.state.change.logger=ERROR
 log4j.logger.org.apache.kafka=ERROR
-log4j.logger.org.apache.zookeeper=ERROR
 log4j.logger.org.apache.kafka.clients=ERROR
 
 # These are the only logs we will likely ever find anything useful in to debug 
Streams test failures
diff --git a/streams/src/test/resources/log4j.properties 
b/streams/src/test/resources/log4j.properties
index b7e1fb2d60e..104b46df20f 100644
--- a/streams/src/test/resources/log4j.properties
+++ b/streams/src/test/resources/log4j.properties
@@ -21,7 +21,6 @@ log4j.appender.stdout.layout.ConversionPattern=[%d] %p %m 
(%c:%L)%n
 log4j.logger.kafka=ERROR
 log4j.logger.state.change.logger=ERROR
 log4j.logger.org.apache.kafka=ERROR
-log4j.logger.org.apache.zookeeper=ERROR
 log4j.logger.org.apache.kafka.clients=ERROR
 
 # These are the only logs we will likely ever find anything useful in to debug 
Streams test failures

Reply via email to