Skip to content

Commit 01b7f30

Browse files
committed
[COMMON] upgrade kafka to 4.2.0
1 parent da8658a commit 01b7f30

6 files changed

Lines changed: 12 additions & 11 deletions

File tree

common/src/main/java/org/astraea/common/admin/AdminImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -647,7 +647,7 @@ public CompletionStage<List<ShareGroup>> shareGroups(Set<String> shareGroupIds)
647647
.collect(
648648
Collectors.toUnmodifiableMap(
649649
tp -> TopicPartition.from(tp.getKey()),
650-
offset -> offset.getValue().offset())),
650+
offset -> offset.getValue().startOffset())),
651651
g.getValue().members().stream()
652652
.collect(
653653
Collectors.toMap(

common/src/main/java/org/astraea/common/metrics/collector/ServerMetricFetcher.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
import org.astraea.common.metrics.BeanQuery;
3232
import org.astraea.common.metrics.JndiClient;
3333

34+
@SuppressWarnings("removal")
3435
public class ServerMetricFetcher implements MetricsReporter, ClientTelemetry {
3536
private static final String BOOTSTRAP_SERVERS_CONFIG = "server.metric.fetcher.bootstrap.servers";
3637
private static final String INTERVAL_CONFIG = "server.metric.fetcher.interval.seconds";

docker/start_broker.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ source $DOCKER_FOLDER/docker_build_common.sh
2121
declare -r ACCOUNT=${ACCOUNT:-opensource4you}
2222
declare -r VERSION=${VERSION:-main}
2323
declare -r KAFKA_ACCOUNT=${KAFKA_ACCOUNT:-apache}
24-
declare -r KAFKA_VERSION=${KAFKA_REVISION:-${KAFKA_VERSION:-4.1.1}}
24+
declare -r KAFKA_VERSION=${KAFKA_REVISION:-${KAFKA_VERSION:-4.2.0}}
2525
declare -r DOCKERFILE=$DOCKER_FOLDER/broker.dockerfile
2626
declare -r DATA_FOLDER_IN_CONTAINER_PREFIX="/tmp/log-folder"
2727
declare -r EXPORTER_VERSION="0.16.1"
@@ -65,7 +65,7 @@ function showHelp() {
6565
echo " ACCOUNT=opensource4you set the github account for astraea repo"
6666
echo " HEAP_OPTS=\"-Xmx2G -Xms2G\" set broker JVM memory"
6767
echo " KAFKA_REVISION=trunk set revision of kafka source code to build container"
68-
echo " KAFKA_VERSION=4.1.1 set version of kafka distribution"
68+
echo " KAFKA_VERSION=4.2.0 set version of kafka distribution"
6969
echo " BUILD=false set true if you want to build image locally"
7070
echo " RUN=false set false if you want to build/pull image only"
7171
echo " DATA_FOLDERS=/tmp/folder1 set host folders used by broker"
@@ -124,7 +124,7 @@ function generateDockerfileByVersion() {
124124
local kafka_url="https://archive.apache.org/dist/kafka/${KAFKA_VERSION}/kafka_2.13-${KAFKA_VERSION}.tgz"
125125
local version=$KAFKA_VERSION
126126
if [[ "$KAFKA_VERSION" == *"rc"* ]]; then
127-
## `4.1.1-rc1` the rc release does not exist in archive repo
127+
## `4.2.0-rc1` the rc release does not exist in archive repo
128128
version=${KAFKA_VERSION%-*}
129129
kafka_url="https://dist.apache.org/repos/dist/dev/kafka/${KAFKA_VERSION}/kafka_2.13-${version}.tgz"
130130
fi

docker/start_controller.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ source $DOCKER_FOLDER/docker_build_common.sh
2020
# ===============================[global variables]===============================
2121
declare -r ACCOUNT=${ACCOUNT:-opensource4you}
2222
declare -r KAFKA_ACCOUNT=${KAFKA_ACCOUNT:-apache}
23-
declare -r KAFKA_VERSION=${KAFKA_REVISION:-${KAFKA_VERSION:-4.1.1}}
23+
declare -r KAFKA_VERSION=${KAFKA_REVISION:-${KAFKA_VERSION:-4.2.0}}
2424
declare -r DOCKERFILE=$DOCKER_FOLDER/controller.dockerfile
2525
declare -r EXPORTER_VERSION="0.16.1"
2626
declare -r CLUSTER_ID=${CLUSTER_ID:-"$(randomString)"}
@@ -55,7 +55,7 @@ function showHelp() {
5555
echo " ACCOUNT=opensource4you set the github account for astraea repo"
5656
echo " HEAP_OPTS=\"-Xmx2G -Xms2G\" set controller JVM memory"
5757
echo " KAFKA_REVISION=trunk set revision of kafka source code to build container"
58-
echo " KAFKA_VERSION=4.1.1 set version of kafka distribution"
58+
echo " KAFKA_VERSION=4.2.0 set version of kafka distribution"
5959
echo " BUILD=false set true if you want to build image locally"
6060
echo " RUN=false set false if you want to build/pull image only"
6161
echo " META_FOLDER=/tmp/folder1 set host folder used by controller"
@@ -104,7 +104,7 @@ function generateDockerfileByVersion() {
104104
local kafka_url="https://archive.apache.org/dist/kafka/${KAFKA_VERSION}/kafka_2.13-${KAFKA_VERSION}.tgz"
105105
local version=$KAFKA_VERSION
106106
if [[ "$KAFKA_VERSION" == *"rc"* ]]; then
107-
## `4.1.1-rc1` the rc release does not exist in archive repo
107+
## `4.2.0-rc1` the rc release does not exist in archive repo
108108
version=${KAFKA_VERSION%-*}
109109
kafka_url="https://dist.apache.org/repos/dist/dev/kafka/${KAFKA_VERSION}/kafka_2.13-${version}.tgz"
110110
fi

docker/start_worker.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ source $DOCKER_FOLDER/docker_build_common.sh
2020
# ===============================[global variables]===============================
2121
declare -r ACCOUNT=${ACCOUNT:-opensource4you}
2222
declare -r KAFKA_ACCOUNT=${KAFKA_ACCOUNT:-apache}
23-
declare -r KAFKA_VERSION=${KAFKA_REVISION:-${KAFKA_VERSION:-4.1.1}}
23+
declare -r KAFKA_VERSION=${KAFKA_REVISION:-${KAFKA_VERSION:-4.2.0}}
2424
declare -r DOCKERFILE=$DOCKER_FOLDER/worker.dockerfile
2525
declare -r WORKER_PORT=${WORKER_PORT:-"$(getRandomPort)"}
2626
declare -r CONTAINER_NAME="worker-$WORKER_PORT"
@@ -50,7 +50,7 @@ function showHelp() {
5050
echo " ACCOUNT=opensource4you set the github account for astraea repo"
5151
echo " HEAP_OPTS=\"-Xmx2G -Xms2G\" set worker JVM memory"
5252
echo " KAFKA_REVISION=trunk set revision of kafka source code to build container"
53-
echo " KAFKA_VERSION=4.1.1 set version of kafka distribution"
53+
echo " KAFKA_VERSION=4.2.0 set version of kafka distribution"
5454
echo " BUILD=false set true if you want to build image locally"
5555
echo " RUN=false set false if you want to build/pull image only"
5656
echo " WORKER_PLUGIN_PATH=/tmp/worker-plugins set plugin path to kafka worker"
@@ -114,7 +114,7 @@ function generateDockerfileByVersion() {
114114
local kafka_url="https://archive.apache.org/dist/kafka/${KAFKA_VERSION}/kafka_2.13-${KAFKA_VERSION}.tgz"
115115
local version=$KAFKA_VERSION
116116
if [[ "$KAFKA_VERSION" == *"rc"* ]]; then
117-
## `4.1.1-rc1` the rc release does not exist in archive repo
117+
## `4.2.0-rc1` the rc release does not exist in archive repo
118118
version=${KAFKA_VERSION%-*}
119119
kafka_url="https://dist.apache.org/repos/dist/dev/kafka/${KAFKA_VERSION}/kafka_2.13-${version}.tgz"
120120
fi

gradle/dependencies.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def versions = [
2929
jcommander : project.properties['jcommander.version'] ?: "1.82",
3030
"jmh" : project.properties['jmh.version'] ?: "1.37",
3131
junit : project.properties['junit.version'] ?: "5.10.2",
32-
kafka : project.properties['kafka.version'] ?: "4.1.1",
32+
kafka : project.properties['kafka.version'] ?: "4.2.0",
3333
mockito : project.properties['mockito.version'] ?: "5.11.0",
3434
"mockito-inline" : project.properties['mockito-inline.version'] ?: "5.2.0",
3535
slf4j : project.properties['slf4j.version'] ?: "2.0.12",

0 commit comments

Comments
 (0)