Skip to content

Commit

Permalink
Merge pull request #2046 from AutoMQ/merge_3_9
Browse files Browse the repository at this point in the history
feat(code): merge apache kafka 3.9.0 6ff51bc
  • Loading branch information
superhx authored Oct 8, 2024
2 parents dcbec6a + db51862 commit de557c8
Show file tree
Hide file tree
Showing 3,672 changed files with 113,294 additions and 46,150 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
36 changes: 18 additions & 18 deletions .asf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,28 +25,28 @@ notifications:
# https://cwiki.apache.org/confluence/pages/viewpage.action?spaceKey=INFRA&title=Git+-+.asf.yaml+features#Git.asf.yamlfeatures-JenkinsPRwhitelisting
jenkins:
github_whitelist:
- vcrfxia
- clolov
- fvaleri
- philipnee
- vamossagar12
- FrankYang0529
- kamalcph
- hudeqi
- lihaosky
- jeffkbkim
- tinaselenge
- apoorvmittal10
- lianetm
- brandboat
- kirktrue
- nizhikov
- OmniaGM
- dongnuo123
- frankvicky

# This list allows you to triage pull requests. It can have a maximum of 10 people.
# https://cwiki.apache.org/confluence/pages/viewpage.action?spaceKey=INFRA&title=Git+-+.asf.yaml+features#Git.asf.yamlfeatures-AssigningexternalcollaboratorswiththetriageroleonGitHub
github:
collaborators:
- vcrfxia
- clolov
- fvaleri
- philipnee
- vamossagar12
- FrankYang0529
- kamalcph
- hudeqi
- lihaosky
- jeffkbkim
- tinaselenge
- apoorvmittal10
- lianetm
- brandboat
- kirktrue
- nizhikov
- OmniaGM
- dongnuo123
- frankvicky
8 changes: 4 additions & 4 deletions .github/workflows/docker_build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v3
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install dependencies
Expand All @@ -55,13 +55,13 @@ jobs:
exit-code: '1'
- name: Upload test report
if: always()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: report_${{ github.event.inputs.image_type }}.html
path: docker/test/report_${{ github.event.inputs.image_type }}.html
- name: Upload CVE scan report
if: always()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: scan_report_${{ github.event.inputs.image_type }}.txt
path: scan_report_${{ github.event.inputs.image_type }}.txt
8 changes: 4 additions & 4 deletions .github/workflows/docker_official_image_build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v3
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install dependencies
Expand All @@ -54,13 +54,13 @@ jobs:
exit-code: '1'
- name: Upload test report
if: always()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: report_${{ github.event.inputs.image_type }}.html
path: docker/test/report_${{ github.event.inputs.image_type }}.html
- name: Upload CVE scan report
if: always()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: scan_report_${{ github.event.inputs.image_type }}.txt
path: scan_report_${{ github.event.inputs.image_type }}.txt
2 changes: 1 addition & 1 deletion .github/workflows/docker_rc_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v3
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker_scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
exit-code: '1'
- name: Upload CVE scan report
if: always()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: scan_report_jvm_${{ matrix.supported_image_tag }}.txt
path: scan_report_jvm_${{ matrix.supported_image_tag }}.txt
4 changes: 2 additions & 2 deletions .github/workflows/prepare_docker_official_image_source.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v3
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v8
- uses: actions/stale@v9
with:
debug-only: ${{ inputs.dryRun || false }}
operations-per-run: ${{ inputs.operationsPerRun || 100 }}
Expand Down
2 changes: 1 addition & 1 deletion automq-shell/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ repositories {

dependencies {
compileOnly libs.awsSdkAuth
implementation libs.log4j
implementation libs.reload4j
implementation libs.nettyBuffer
implementation libs.opentelemetrySdk
implementation libs.jacksonDatabind
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@

package com.automq.shell;

import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;

public class AutoMQApplication {
private static final Logger LOGGER = LoggerFactory.getLogger(AutoMQApplication.class);
private static final ConcurrentMap<Class<?>, Object> CONTAINER = new ConcurrentHashMap<>();
Expand Down
1 change: 1 addition & 0 deletions automq-shell/src/main/java/com/automq/shell/AutoMQCLI.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
package com.automq.shell;

import com.automq.shell.commands.cluster.Cluster;

import picocli.CommandLine;

@CommandLine.Command(name = "automq-cli", mixinStandardHelpOptions = true, version = "automq-cli 1.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,18 @@

package com.automq.shell.commands.cluster;

import org.apache.kafka.common.Uuid;

import com.google.common.io.Resources;

import java.io.File;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.concurrent.Callable;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.apache.kafka.common.Uuid;

import picocli.CommandLine;

@CommandLine.Command(name = "create", description = "Create a AutoMQ cluster project", mixinStandardHelpOptions = true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@

package com.automq.shell.commands.cluster;

import org.apache.kafka.common.utils.Exit;

import com.automq.shell.model.ClusterTopology;
import com.automq.shell.model.Env;
import com.automq.shell.model.Node;
Expand All @@ -20,6 +22,9 @@
import com.automq.stream.s3.operator.ObjectStorageFactory;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.dataformat.yaml.YAMLFactory;

import org.apache.commons.lang3.StringUtils;

import java.io.File;
import java.io.IOException;
import java.io.StringReader;
Expand All @@ -30,8 +35,7 @@
import java.util.Properties;
import java.util.concurrent.Callable;
import java.util.stream.Collectors;
import org.apache.commons.lang3.StringUtils;
import org.apache.kafka.common.utils.Exit;

import picocli.CommandLine;

@CommandLine.Command(name = "deploy", description = "Deploy AutoMQ cluster", mixinStandardHelpOptions = true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,21 @@

package com.automq.shell.commands.cluster;

import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.Properties;
import java.util.concurrent.Callable;
import org.apache.commons.lang3.exception.ExceptionUtils;
import org.apache.kafka.clients.admin.Admin;
import org.apache.kafka.clients.admin.AdminClientConfig;
import org.apache.kafka.clients.admin.GetNodesOptions;
import org.apache.kafka.clients.admin.GetNodesResult;
import org.apache.kafka.clients.admin.NodeMetadata;
import org.apache.kafka.common.utils.Utils;

import org.apache.commons.lang3.exception.ExceptionUtils;

import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.Properties;
import java.util.concurrent.Callable;

import picocli.CommandLine;

@CommandLine.Command(name = "describe", description = "Describe the AutoMQ cluster", mixinStandardHelpOptions = true)
Expand Down
11 changes: 7 additions & 4 deletions automq-shell/src/main/java/com/automq/shell/log/LogUploader.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@
import com.automq.stream.s3.operator.ObjectStorage.ObjectPath;
import com.automq.stream.s3.operator.ObjectStorage.WriteOptions;
import com.google.common.collect.Lists;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.nio.charset.StandardCharsets;
import java.time.Duration;
import java.time.Instant;
Expand All @@ -35,8 +37,9 @@
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;

public class LogUploader implements LogRecorder {
private static final Logger LOGGER = LoggerFactory.getLogger(LogUploader.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@
package com.automq.shell.metrics;

import com.automq.stream.s3.operator.ObjectStorage;
import java.util.List;

import org.apache.commons.lang3.tuple.Pair;

import java.util.List;

public interface S3MetricsConfig {

String clusterId();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,10 @@
import com.fasterxml.jackson.databind.node.ArrayNode;
import com.fasterxml.jackson.databind.node.ObjectNode;
import com.google.common.collect.Lists;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
import io.opentelemetry.api.common.Attributes;
import io.opentelemetry.sdk.common.CompletableResultCode;
import io.opentelemetry.sdk.metrics.InstrumentType;
import io.opentelemetry.sdk.metrics.data.AggregationTemporality;
import io.opentelemetry.sdk.metrics.data.HistogramPointData;
import io.opentelemetry.sdk.metrics.data.MetricData;
import io.opentelemetry.sdk.metrics.export.MetricExporter;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.net.InetAddress;
import java.nio.charset.Charset;
import java.time.Duration;
Expand All @@ -44,8 +39,16 @@
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
import io.opentelemetry.api.common.Attributes;
import io.opentelemetry.sdk.common.CompletableResultCode;
import io.opentelemetry.sdk.metrics.InstrumentType;
import io.opentelemetry.sdk.metrics.data.AggregationTemporality;
import io.opentelemetry.sdk.metrics.data.HistogramPointData;
import io.opentelemetry.sdk.metrics.data.MetricData;
import io.opentelemetry.sdk.metrics.export.MetricExporter;

public class S3MetricsExporter implements MetricExporter {
private static final Logger LOGGER = LoggerFactory.getLogger(S3MetricsExporter.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
package com.automq.shell.model;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

import java.util.Collections;
import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
package com.automq.shell.model;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

import java.util.Collections;
import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,6 @@

package com.automq.shell.stream;

import com.automq.shell.metrics.S3MetricsExporter;
import com.automq.stream.api.KeyValue;
import java.io.IOException;
import java.util.List;
import java.util.Objects;
import org.apache.kafka.clients.ClientRequest;
import org.apache.kafka.clients.ClientResponse;
import org.apache.kafka.clients.NetworkClient;
Expand All @@ -33,9 +28,17 @@
import org.apache.kafka.common.requests.s3.GetKVsRequest;
import org.apache.kafka.common.requests.s3.PutKVsRequest;
import org.apache.kafka.common.utils.Time;

import com.automq.shell.metrics.S3MetricsExporter;
import com.automq.stream.api.KeyValue;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.io.IOException;
import java.util.List;
import java.util.Objects;

public class ClientKVClient {
private static final Logger LOGGER = LoggerFactory.getLogger(S3MetricsExporter.class);

Expand Down
Loading

0 comments on commit de557c8

Please sign in to comment.