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 9f7af939787 MINOR: Use JDK 17 in Vagrant after dropping JDK 8 (#17861)
9f7af939787 is described below

commit 9f7af93978723090aa8b84d147cdf561cbf51bee
Author: Dongnuo Lyu <[email protected]>
AuthorDate: Wed Nov 20 03:08:17 2024 -0500

    MINOR: Use JDK 17 in Vagrant after dropping JDK 8 (#17861)
    
    Reviewers: Chia-Ping Tsai <[email protected]>
---
 Vagrantfile     |  4 ++--
 vagrant/base.sh | 26 ++++++++++++++++++++++++--
 2 files changed, 26 insertions(+), 4 deletions(-)

diff --git a/Vagrantfile b/Vagrantfile
index a053be28d01..7541f50f08d 100644
--- a/Vagrantfile
+++ b/Vagrantfile
@@ -55,8 +55,8 @@ ec2_iam_instance_profile_name = nil
 
 ebs_volume_type = 'gp3'
 
-jdk_major = '8'
-jdk_full = '8u202-linux-x64'
+jdk_major = '17'
+jdk_full = '17-linux-x64'
 
 local_config_file = File.join(File.dirname(__FILE__), "Vagrantfile.local")
 if File.exists?(local_config_file) then
diff --git a/vagrant/base.sh b/vagrant/base.sh
index 7290ae49767..449e20cfffc 100755
--- a/vagrant/base.sh
+++ b/vagrant/base.sh
@@ -36,8 +36,8 @@ fetch_jdk_tgz() {
   fi
 }
 
-JDK_MAJOR="${JDK_MAJOR:-8}"
-JDK_FULL="${JDK_FULL:-8u202-linux-x64}"
+JDK_MAJOR="${JDK_MAJOR:-17}"
+JDK_FULL="${JDK_FULL:-17-linux-x64}"
 
 if [ -z `which javac` ]; then
     apt-get -y update
@@ -151,6 +151,28 @@ chmod a+rw /opt/kafka-3.8.1
 get_kafka 3.9.0 2.12
 chmod a+rw /opt/kafka-3.9.0
 
+# To ensure the Kafka cluster starts successfully under JDK 17, we need to 
update the Zookeeper
+# client from version 3.4.x to 3.5.7 in Kafka versions 2.1.1, 2.2.2, and 
2.3.1, as the older Zookeeper
+# client is incompatible with JDK 17. See KAFKA-17888 for more details.
+curl -s 
"https://repo1.maven.org/maven2/org/apache/zookeeper/zookeeper/3.5.7/zookeeper-3.5.7.jar";
 -o /opt/zookeeper-3.5.7.jar
+curl -s 
"https://repo1.maven.org/maven2/org/apache/zookeeper/zookeeper-jute/3.5.7/zookeeper-jute-3.5.7.jar";
 -o /opt/zookeeper-jute-3.5.7.jar
+rm -f /opt/kafka-2.1.1/libs/zookeeper-*
+rm -f /opt/kafka-2.2.2/libs/zookeeper-*
+rm -f /opt/kafka-2.3.1/libs/zookeeper-*
+
+cp /opt/zookeeper-3.5.7.jar /opt/kafka-2.1.1/libs/zookeeper-3.5.7.jar
+chmod a+rw /opt/kafka-2.1.1/libs/zookeeper-3.5.7.jar
+cp /opt/zookeeper-3.5.7.jar /opt/kafka-2.2.2/libs/zookeeper-3.5.7.jar
+chmod a+rw /opt/kafka-2.2.2/libs/zookeeper-3.5.7.jar
+cp /opt/zookeeper-3.5.7.jar /opt/kafka-2.3.1/libs/zookeeper-3.5.7.jar
+chmod a+rw /opt/kafka-2.3.1/libs/zookeeper-3.5.7.jar
+cp /opt/zookeeper-jute-3.5.7.jar /opt/kafka-2.1.1/libs/zookeeper-jute-3.5.7.jar
+chmod a+rw /opt/kafka-2.1.1/libs/zookeeper-jute-3.5.7.jar
+cp /opt/zookeeper-jute-3.5.7.jar /opt/kafka-2.2.2/libs/zookeeper-jute-3.5.7.jar
+chmod a+rw /opt/kafka-2.2.2/libs/zookeeper-jute-3.5.7.jar
+cp /opt/zookeeper-jute-3.5.7.jar /opt/kafka-2.3.1/libs/zookeeper-jute-3.5.7.jar
+chmod a+rw /opt/kafka-2.3.1/libs/zookeeper-jute-3.5.7.jar
+
 # For EC2 nodes, we want to use /mnt, which should have the local disk. On 
local
 # VMs, we can just create it if it doesn't exist and use it like we'd use
 # /tmp. Eventually, we'd like to also support more directories, e.g. when EC2

Reply via email to