You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bigtop.apache.org by iw...@apache.org on 2022/01/11 16:01:47 UTC
[bigtop] branch master updated: BIGTOP-3601. Bump Kafka to 2.8.1. (#832)
This is an automated email from the ASF dual-hosted git repository.
iwasakims pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/bigtop.git
The following commit(s) were added to refs/heads/master by this push:
new 31f08c1 BIGTOP-3601. Bump Kafka to 2.8.1. (#832)
31f08c1 is described below
commit 31f08c1537ea9579399de6e97f0ba3978e6820c8
Author: Masatake Iwasaki <iw...@apache.org>
AuthorDate: Wed Jan 12 01:01:39 2022 +0900
BIGTOP-3601. Bump Kafka to 2.8.1. (#832)
---
.../modules/kafka/templates/server.properties | 2 +
.../src/common/kafka/do-component-build | 2 -
.../src/common/kafka/patch0-KAFKA-12293-2.8.1.diff | 46 ++++++++++++++++++++++
.../kafka/patch1-PR11554-set-version-of-jgit.diff | 27 +++++++++++++
bigtop-packages/src/rpm/kafka/SPECS/kafka.spec | 3 ++
.../smoke-tests/kafka/TestKafkaSmoke.groovy | 13 ------
bigtop.bom | 2 +-
7 files changed, 79 insertions(+), 16 deletions(-)
diff --git a/bigtop-deploy/puppet/modules/kafka/templates/server.properties b/bigtop-deploy/puppet/modules/kafka/templates/server.properties
index a58c7b3..aefd2d6 100644
--- a/bigtop-deploy/puppet/modules/kafka/templates/server.properties
+++ b/bigtop-deploy/puppet/modules/kafka/templates/server.properties
@@ -136,3 +136,5 @@ zookeeper.connect=<%= @zookeeper_connection_string %>
# Timeout in ms for connecting to zookeeper
zookeeper.connection.timeout.ms=1000000
+
+delete.topic.enable=true
diff --git a/bigtop-packages/src/common/kafka/do-component-build b/bigtop-packages/src/common/kafka/do-component-build
index a48b9e3..843a7a1 100644
--- a/bigtop-packages/src/common/kafka/do-component-build
+++ b/bigtop-packages/src/common/kafka/do-component-build
@@ -27,8 +27,6 @@ BUILD_OPTS="-Divy.home=${HOME}/.ivy2 -Dsbt.ivy.home=${HOME}/.ivy2 -Duser.home=${
# http://maven.40175.n5.nabble.com/Not-finding-artifact-in-local-repo-td3727753.html
export MAVEN_OPTS="-Xmx2g -XX:ReservedCodeCacheSize=512m"
-gradle wrapper
-
# Rewrite the zookeeper version defined in gradle/dependencies.gradle directly
# with $ZOOKEEPER_VERSION, because we can't override it via command line option.
sed -i -e 's/zookeeper: *"\([0-9]\{1,\}\.\)*[0-9]\{1,\}"/zookeeper: "'${ZOOKEEPER_VERSION}'"/' gradle/dependencies.gradle
diff --git a/bigtop-packages/src/common/kafka/patch0-KAFKA-12293-2.8.1.diff b/bigtop-packages/src/common/kafka/patch0-KAFKA-12293-2.8.1.diff
new file mode 100644
index 0000000..10db190
--- /dev/null
+++ b/bigtop-packages/src/common/kafka/patch0-KAFKA-12293-2.8.1.diff
@@ -0,0 +1,46 @@
+diff --git a/build.gradle b/build.gradle
+index e21609fd49..a187004b69 100644
+--- a/build.gradle
++++ b/build.gradle
+@@ -20,12 +20,10 @@ import java.nio.charset.StandardCharsets
+ buildscript {
+ repositories {
+ mavenCentral()
+- jcenter()
+ maven {
+ url "https://plugins.gradle.org/m2/"
+ }
+ }
+- apply from: file('gradle/buildscript.gradle'), to: buildscript
+ apply from: "$rootDir/gradle/dependencies.gradle"
+
+ dependencies {
+diff --git a/gradle/buildscript.gradle b/gradle/buildscript.gradle
+deleted file mode 100644
+index 83967bb47d..0000000000
+--- a/gradle/buildscript.gradle
++++ /dev/null
+@@ -1,23 +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.
+-
+-repositories {
+- repositories {
+- // For license plugin.
+- maven {
+- url 'https://dl.bintray.com/content/netflixoss/external-gradle-plugins/'
+- }
+- }
+-}
diff --git a/bigtop-packages/src/common/kafka/patch1-PR11554-set-version-of-jgit.diff b/bigtop-packages/src/common/kafka/patch1-PR11554-set-version-of-jgit.diff
new file mode 100644
index 0000000..dfe62ae
--- /dev/null
+++ b/bigtop-packages/src/common/kafka/patch1-PR11554-set-version-of-jgit.diff
@@ -0,0 +1,27 @@
+diff --git a/build.gradle b/build.gradle
+index 54b93d1792..4330fed04f 100644
+--- a/build.gradle
++++ b/build.gradle
+@@ -37,6 +37,10 @@ buildscript {
+ classpath "com.diffplug.spotless:spotless-plugin-gradle:$versions.spotlessPlugin"
+ classpath "gradle.plugin.com.github.spotbugs.snom:spotbugs-gradle-plugin:$versions.spotbugsPlugin"
+ classpath "org.gradle:test-retry-gradle-plugin:$versions.testRetryPlugin"
++ // Override jgit dependency used by grgit and spotless as we appear to auto resolve to
++ // 5.13.0.202109080827-r and the latest version requires java 9.
++ // Requires force=true to be used in spotless as reported by ./gradlew buildEnvironment.
++ classpath("org.eclipse.jgit:org.eclipse.jgit:$versions.jgit") { force = true }
+ }
+ }
+
+diff --git a/gradle/dependencies.gradle b/gradle/dependencies.gradle
+index 43c297fb7a..d73e470eb1 100644
+--- a/gradle/dependencies.gradle
++++ b/gradle/dependencies.gradle
+@@ -72,6 +72,7 @@ versions += [
+ javassist: "3.27.0-GA",
+ jetty: "9.4.43.v20210629",
+ jersey: "2.34",
++ jgit: "5.12.0.202106070339-r",
+ jline: "3.12.1",
+ jmh: "1.27",
+ hamcrest: "2.2",
diff --git a/bigtop-packages/src/rpm/kafka/SPECS/kafka.spec b/bigtop-packages/src/rpm/kafka/SPECS/kafka.spec
index a817a19..b94df51 100644
--- a/bigtop-packages/src/rpm/kafka/SPECS/kafka.spec
+++ b/bigtop-packages/src/rpm/kafka/SPECS/kafka.spec
@@ -66,6 +66,7 @@ Source2: install_%{kafka_name}.sh
Source3: kafka-server.svc
Source4: init.d.tmpl
Source6: kafka.default
+#BIGTOP_PATCH_FILES
Requires: zookeeper
Requires: bigtop-utils >= 0.7
Requires(preun): /sbin/service
@@ -95,6 +96,8 @@ Bundles the init script for kafka server.
%prep
%setup -n %{kafka_name}-%{kafka_base_version}-src
+#BIGTOP_PATCH_COMMANDS
+
%build
bash $RPM_SOURCE_DIR/do-component-build
diff --git a/bigtop-tests/smoke-tests/kafka/TestKafkaSmoke.groovy b/bigtop-tests/smoke-tests/kafka/TestKafkaSmoke.groovy
index 9dafd47..a1d1c88 100644
--- a/bigtop-tests/smoke-tests/kafka/TestKafkaSmoke.groovy
+++ b/bigtop-tests/smoke-tests/kafka/TestKafkaSmoke.groovy
@@ -32,20 +32,7 @@ class TestKafkaSmoke {
static Shell sh = new Shell("/bin/bash -s");
static final String KAFKA_HOME = "/usr/lib/kafka"
- static final String KAFKA_CONFIG = KAFKA_HOME + "/config/server.properties "
static final String KAFKA_TOPICS = KAFKA_HOME + "/bin/kafka-topics.sh "
- static final String KAFKA_SERVER_START = KAFKA_HOME + "/bin/kafka-server-start.sh "
- static final String KAFKA_SERVER_STOP = KAFKA_HOME + "/bin/kafka-server-stop.sh "
-
- @BeforeClass
- static void kafkaSetUp() {
- /* Restart kafka server for Enabling 'delete.topic.enable' */
- sh.exec(KAFKA_SERVER_STOP);
- sh.exec(KAFKA_SERVER_START + KAFKA_CONFIG
- + " --override delete.topic.enable=true &"
- );
- assertTrue("Restart Kafka server failed. ", sh.getRet() == 0);
- }
@AfterClass
public static void deleteKafkaTopics() {
diff --git a/bigtop.bom b/bigtop.bom
index c4cf4a0..b5d2d43 100644
--- a/bigtop.bom
+++ b/bigtop.bom
@@ -291,7 +291,7 @@ bigtop {
'kafka' {
name = 'kafka'
relNotes = 'Apache Kafka'
- version { base = '2.4.1'; pkg = base; release = 1 }
+ version { base = '2.8.1'; pkg = base; release = 1 }
tarball { destination = "$name-${version.base}.tar.gz"
source = "$name-${version.base}-src.tgz" }
url { download_path = "/$name/${version.base}/"