Commit Graph

228 Commits

Author SHA1 Message Date
Stig Døssing e71b9ab3be
KAFKA-17653 Update Scala version to 2.13.15 for support Java 23 (3.9 backport) (#19307)
cherry picked from commit 9cb49092f0 in trunk

Co-authored-by: Ken Huang <s7133700@gmail.com>

Reviewers: Luke Chen <showuon@gmail.com>
2025-04-07 10:25:56 +08:00
Krishna Agarwal bb6a042e99
KAFKA-16827: Integrate kafka native-image with system tests (#16046)
This PR does following things

System tests should bring up Kafka broker in the native mode
System tests should run on Kafka broker in native mode
Extract out native build command so that it can be reused.
Allow system tests to run on Native Kafka broker using Docker mechanism

To run system tests by bringing up Kafka in native mode:
Pass kafka_mode as native in the ducktape globals:--globals '{\"kafka_mode\":\"native\"}'

Running system tests by bringing up kafka in native mode via docker mechanism
_DUCKTAPE_OPTIONS="--globals '{\"kafka_mode\":\"native\"}'" TC_PATHS="tests/kafkatest/tests/"  bash tests/docker/run_tests.sh

To only bring up ducker nodes to cater native kafka
bash tests/docker/ducker-ak up -m native

Reviewers: Manikumar Reddy <manikumar.reddy@gmail.com>
2024-05-30 22:24:23 +05:30
Ken Huang 7fea279ff9
KAFKA-16763 Upgrade to scala 2.12.19 and scala 2.13.14 (#15958)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-05-18 00:36:38 +08:00
Nikolay b6183a4134
KAFKA-14589 ConsumerGroupCommand rewritten in java (#14471)
This PR contains changes to rewrite ConsumerGroupCommand in java and transfer it to tools module

Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-03-20 15:34:45 +08:00
Mickael Maison 0bf830fc9c
KAFKA-14576: Move ConsoleConsumer to tools (#15274)
Reviewers: Josep Prat <josep.prat@aiven.io>, Omnia Ibrahim <o.g.h.ibrahim@gmail.com>
2024-02-13 19:24:07 +01:00
Hailey Ni 40e817eeff
KAFKA-15471 [MINOR]: Fix backward-compatibility bug (#14996)
Fixes a backwards-compatibility issue in the KIP-979 change to the kafka-server-stop.sh script where it would not stop processes if run from a directory that differed from the directory where the processes were started form and the config file specified at start time was a relative path.

Reviewers: Ron Dagostino <rdagostino@confluent.io>
2023-12-14 10:32:16 -05:00
Hailey Ni ad1d621ca4
KAFKA-15471: Allow independently stop KRaft controllers or brokers (#14400)
Reviewers: Ron Dagostino <rdagostino@confluent.io>
2023-12-12 03:20:43 -05:00
Andrew Schofield 46852eea1c
KAFKA-15871: kafka-client-metrics.sh (#14926)
Initial implementation of kafka-client-metrics.sh tools for KIP-714 and KIP-1000.

Reviewers: Igor Soarez <soarez@apple.com>, Jun Rao <junrao@gmail.com>
2023-12-06 10:10:10 -08:00
Yash Mayya 1bc4de75a2
KAFKA-15470: Allow creating connectors in a stopped state (#14704)
Reviewers: Chris Egerton <chrise@aiven.io>
2023-11-15 11:37:50 +05:30
Nikolay 76b1b50b64
KAFKA-14595 Move ReassignPartitionsCommand to java (#13247)
This PR contains changes required to move PartitionReassignmentState class to java code.

Reviewers: Mickael Maison <mickael.maison@gmail.com>, Justine Olshan <jolshan@confluent.io>, Federico Valeri <fedevaleri@gmail.com>, Taras Ledkov Taras Ledkov <tledkov@apache.org>, Kamal Chandraprakash<kamal.chandraprakash@gmail.com>,
2023-10-31 17:29:05 -07:00
maniekes 987609404c
KAFKA-15685: Add support for MinGW and MSYS2 (windows OS) (#13321)
Kafka class runner does not work with MINGW/Git Bash on Windows. This commit adds support for MinGW and MSYS2 development environments.

Reviewers: Divij Vaidya <diviv@amazon.com>
2023-10-26 11:29:39 +02:00
Omnia G.H Ibrahim 9af1e74b5e
KAFKA-14596: Move TopicCommand to tools (#13201)
Reviewers: Mickael Maison <mickael.maison@gmail.com>, Federico Valeri <fedevaleri@gmail.com>
2023-10-17 11:40:15 +02:00
Omnia G.H Ibrahim 7553d3f562
KAFKA-14593: Move LeaderElectionCommand to tools (#13204)
Reviewers: Mickael Maison <mickael.maison@gmail.com>, Federico Valeri <fedevaleri@gmail.com>
2023-10-03 11:59:56 +02:00
Ismael Juma 7ba6d7a0b4
MINOR: Update to Scala 2.13.12 (#14430)
It offers a quickfix action for certain errors, includes a number of bug fixes and it
introduces a new warning by default (https://github.com/scala/scala/pull/10462).

In addition to the scala version bump, we also fix the new compiler warnings and
bump the scalafmt version (the previous version failed with the new scala version).

Release notes: https://github.com/scala/scala/releases/tag/v2.13.12

Reviewers: Divij Vaidya <diviv@amazon.com>, Satish Duggana <satishd@apache.org>
2023-09-24 06:05:12 -07:00
Ruslan Krivoshein b72d92919f
KAFKA-14581: Moving GetOffsetShell to tools (#13562)
This PR moves GetOffsetShell from core module to tools module with rewriting from Scala to Java.

Reviewers: Federico Valeri fedevaleri@gmail.com, Ziming Deng dengziming1993@gmail.com, Mickael Maison mimaison@apache.org.
2023-09-11 10:30:22 +08:00
Greg Harris f5655d31d3
KAFKA-15030: Add connect-plugin-path command-line tool (#14064)
Reviewers: Chris Egerton <chrise@aiven.io>
2023-08-11 12:05:51 -07:00
Federico Valeri bb677c4959
KAFKA-14583: Move ReplicaVerificationTool to tools (#14059)
Reviewers: Mickael Maison <mickael.maison@gmail.com>
2023-07-26 12:04:34 +02:00
Nikolay 4bba2c8a32
KAFKA-14591: Move DeleteRecordsCommand to tools (#13278)
Reviewers: Mickael Maison <mickael.maison@gmail.com>, Federico Valeri <fedevaleri@gmail.com>
2023-07-21 17:30:28 +02:00
Ismael Juma dfaae317b8
MINOR: Upgrade Scala for Java 20/21 support (#13840)
Upgrade to Scala 2.13.11 and Scala 2.12.18. A minor test change was required
to fix compilation with Scala 2.13.11.

Scala 2.13 release notes:
* https://github.com/scala/scala/releases/tag/v2.13.11

Scala 2.12 release notes:
* https://github.com/scala/scala/releases/tag/v2.12.16
* https://github.com/scala/scala/releases/tag/v2.12.17
* https://github.com/scala/scala/releases/tag/v2.12.18

Reviewers: Justine Olshan <jolshan@confluent.io>, Josep Prat <josep.prat@aiven.io>
2023-06-20 10:29:23 -07:00
Christo Lolov dc7819d7f1
KAFKA-14594: Move LogDirsCommand to tools module (#13122)
Reviewers: Mickael Maison <mickael.maison@gmail.com>
2023-05-04 12:00:33 +02:00
Gantigmaa Selenge ea540fa400
KAFKA-14592: Move FeatureCommand to tools (#13459)
KAFKA-14592: Move FeatureCommand to tools

Reviewers: Luke Chen <showuon@gmail.com>
2023-04-25 20:28:37 +08:00
Federico Valeri 2c1cf03a89
MINOR: Add ClusterTool wrapper scripts and redirection (KIP-906) (#13560)
Reviewers: Mickael Maison <mickael.maison@gmail.com>
2023-04-17 16:09:56 +02:00
Federico Valeri ac38fd9db9
MINOR: Add EndToEndLatency wrapper scripts and redirection (KIP-906) (#13556)
Reviewers: Mickael Maison <mickael.maison@gmail.com>
2023-04-17 15:31:50 +02:00
Federico Valeri 57d6a881ca
MINOR: Add JmxTool wrapper scripts and redirection (KIP-906) (#13195)
Reviewers: Mickael Maison <mickael.maison@gmail.com>

, 
David Jacot <djacot@confluent.io>, Christo Lolov <christololov@gmail.com>, Alexandre Dupriez <alexandre.dupriez@gmail.com>
2023-04-17 14:59:35 +02:00
vamossagar12 c14f56b484
KAFKA-14586: Moving StreamResetter to tools (#13127)
Moves StreamResetter to tools project.

Reviewers: Federico Valeri <fedevaleri@gmail.com>, Christo Lolov <lolovc@amazon.com>, Bruno Cadonna <cadonna@apache.org>
2023-03-28 14:43:22 +02:00
Chia-Ping Tsai a375777d80
MINOR: correct the class name for delegation token script (#13411)
Reviewers: David Jacot <djacot@confluent.io>
2023-03-18 18:53:22 +08:00
José Armando García Sancio df86228aaf
MINOR; Fix command name kafka-metadata-quorum (#13381)
The name of the command should be kafka-metadata-quorum not
kafka-metatada-quorum.

Reviewers: Ron Dagostino <rdagostino@confluent.io>, Divij Vaidya <diviv@amazon.com>
2023-03-13 10:51:32 -07:00
Federico Valeri 07e2f6cd4d
KAFKA-14578: Move ConsumerPerformance to tools (#13215)
Reviewers: Mickael Maison <mickael.maison@gmail.com>, Alexandre Dupriez <alexandre.dupriez@gmail.com>
2023-03-06 18:16:55 +01:00
Mickael Maison 8b44237655
KAFKA-14575: Move ClusterTool to tools module (#13080)
Reviewers: dengziming <dengziming1993@gmail.com>, Federico Valeri  <fedevaleri@gmail.com>
2023-01-22 12:50:43 +01:00
Ismael Juma 88725669e7
MINOR: Move MetadataQuorumCommand from `core` to `tools` (#12951)
`core` should only be  used for legacy cli tools and tools that require
access to `core` classes instead of communicating via the kafka protocol
(typically by using the client classes).

Summary of changes:
1. Convert the command implementation and tests to Java and move it to
    the `tools` module.
2. Introduce mechanism to capture stdout and stderr from tests.
3. Change `kafka-metadata-quorum.sh` to point to the new command class.
4. Adjusted the test classpath of the `tools` module so that it supports tests
    that rely on the `@ClusterTests` annotation.
5. Improved error handling when an exception different from `TerseFailure` is
    thrown.
6. Changed `ToolsUtils` to avoid usage of arrays in favor of `List`.

Reviewers: dengziming <dengziming1993@gmail.com>
2022-12-09 09:22:58 -08:00
Matthew de Detrich 6ae08c4ee8
KAFKA-14256: Upgrade from Scala 2.13.8 to 2.13.10 (#12675)
In addition to the version bump, we also had to:
* Update the zinc version
* Workaround compiler warnings via suppression (proper fix in a follow up)
* Adjust `testDeleteTopicDoesNotRetryThrottlingQuotaExceededException` to fix a test failure

Release notes:
* https://github.com/scala/scala/releases/tag/v2.13.9
* https://github.com/scala/scala/releases/tag/v2.13.10

Reviewers: Ismael Juma <ismael@juma.me.uk>
2022-12-04 21:02:43 -08:00
FUNKYE 41d075ba14
KAFKA-14430: Specify JMX RMI port system property when not already set (#12898)
Reviewers: Andriy Redko <andriy.redko@aiven.io>, Chris Egerton <chrise@aiven.io>
2022-12-01 22:46:37 -05:00
Matthew Stidham fdcde1fb78
MINOR: replace deprecated egrep in kafka-run-class (#12649)
The egrep is deprecated in 2007 and be replaced with grep -E

Signed-off-by: Matthew Stidham <stidmatt@gmail.com>

Reviewers: Luke Chen <showuon@gmail.com>
2022-09-16 14:32:53 +08:00
dengziming 150fd5b0b1
KAFKA-13914: Add command line tool kafka-metadata-quorum.sh (#12469)
Add `MetadataQuorumCommand` to describe quorum status, I'm trying to use arg4j style command format, currently, we only support one sub-command which is "describe" and we can specify 2 arguments which are --status and --replication.

```
# describe quorum status
kafka-metadata-quorum.sh --bootstrap-server localhost:9092 describe --replication

ReplicaId	LogEndOffset	Lag	LastFetchTimeMs	LastCaughtUpTimeMs	Status  	
0        	10          	        0  	-1             	        -1                	                 Leader  	
1        	10          	        0  	-1             	        -1                	                 Follower	
2        	10          	        0  	-1             	        -1                	                 Follower	

kafka-metadata-quorum.sh --bootstrap-server localhost:9092 describe --status
ClusterId:                             fMCL8kv1SWm87L_Md-I2hg
LeaderId:                             3002
LeaderEpoch:                      2
HighWatermark:                  10
MaxFollowerLag:                 0
MaxFollowerLagTimeMs:   -1
CurrentVoters:                    [3000,3001,3002]
CurrentObservers:              [0,1,2]

# specify AdminClient properties
kafka-metadata-quorum.sh --bootstrap-server localhost:9092 --command-config config.properties describe --status
```

Reviewers: Jason Gustafson <jason@confluent.io>
2022-08-20 08:37:26 -07:00
Orsák Maroš 36bfc3a254
MINOR: Update scala version in bin scripts to 2.13.8 (#12477)
This PR updates scala versions inside `bin/scripts` (i.e., `kafka-run-class.sh`).
#12273 only modified `gradle.properties`.

Reviewers: Ismael Juma <ismael@juma.me.uk>

Signed-off-by: morsak <xorsak02@stud.fit.vutbr.cz>
2022-08-08 15:25:58 -07:00
Konstantine Karantasis dd62ef2eda
KAFKA-13748: Do not include file stream connectors in Connect's CLASSPATH and plugin.path by default (#11908)
With this change we stop including the non-production grade connectors that are meant to be used for demos and quick starts by default in the CLASSPATH and plugin.path of Connect deployments. The package of these connector will still be shipped with the Apache Kafka distribution and will be available for explicit inclusion. 

The changes have been tested through the system tests and the existing unit and integration tests. 

Reviewers: Mickael Maison <mickael.maison@gmail.com>, Randall Hauch <rhauch@gmail.com>
2022-03-30 13:15:42 -07:00
GauthamM-official eb6c5baf3e
MINOR: Adding kafka-storage.bat file (similar to kafka-storage.sh) for windows. (#11816)
Reviewers: Jun Rao <junrao@gmail.com>
2022-03-14 09:20:28 -07:00
Jason Gustafson fce771579c
KAFKA-12888; Add transaction tool from KIP-664 (#10814)
This patch adds the transaction tool specified in KIP-664: https://cwiki.apache.org/confluence/display/KAFKA/KIP-664%3A+Provide+tooling+to+detect+and+abort+hanging+transactions. This includes all of the logic for describing transactional state and for aborting transactions. The only thing that is left out is the `--find-hanging` implementation, which will be left for a subsequent patch.

Reviewers: Boyang Chen <boyang@apache.org>, David Jacot <djacot@confluent.io>
2021-06-22 09:47:30 -07:00
Josep Prat a8bd649dbf
MINOR: Update Scala to 2.13.6 (#10711)
This includes TASTy Reader support for Scala 3.0.0. This makes it easier
for Kafka libraries to be used in Scala 3.0 projects

Release notes: https://github.com/scala/scala/releases/tag/v2.13.6

Reviewers: Ismael Juma <ismael@juma.me.uk>
2021-05-19 05:26:08 -07:00
Shay Elkin fc405d792d
Minor: Move trogdor out of tools and into its own gradle module (#10539)
Move Trogdor out of tools and into its own gradle module.  This allows us to minimize
the dependencies of the tools module.  We still keep Trogdor in the CLASSPATH
created by kafka-run-class.sh.

Reviewers: Colin P. McCabe <cmccabe@apache.org>
2021-04-15 11:37:15 -07:00
David Jacot 6d7a9012dc
KAFKA-8405; Remove deprecated `kafka-preferred-replica-election` command (#10443)
The `kafka-preferred-replica-election` command was deprecated in 2.4. This path removes it for 3.0. `kafka-leader-election` can be used instead.

Reviewers: Ismael Juma <ismael@juma.me.uk>, Chia-Ping Tsai <chia7712@gmail.com>, Jason Gustafson <jason@confluent.io>
2021-03-31 20:45:18 +02:00
Colin Patrick McCabe 5813446730
MINOR: fix kafka-metadata-shell.sh (#10226)
* Fix CLASSPATH issues in the startup script

* Fix overly verbose log messages during loading

* Update to use the new MetadataRecordSerde (this is needed now that we
  have a frame version)

* Fix initialization

Reviewers: Jason Gustafson <jason@confluent.io>
2021-02-26 17:13:20 -08:00
Ismael Juma dd34e40f3e
MINOR: Update Scala to 2.13.5 (#10169)
This includes a fix from Chia-Ping that removes tuple
allocations when `Map.forKeyValue` is used
(https://github.com/scala/scala/pull/9425) and support
for JDK 16.

Release notes:
https://github.com/scala/scala/releases/tag/v2.13.5

Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2021-02-22 22:02:38 -08:00
Colin P. Mccabe 690f72dd69 KAFKA-12334: Add the KIP-500 metadata shell
The Kafka Metadata shell is a new command which allows users to
interactively examine the metadata stored in a KIP-500 cluster.
It can examine snapshot files that are specified via --snapshot.

The metadata tool works by replaying the log and storing the state into
in-memory nodes.  These nodes are presented in a fashion similar to
filesystem directories.

Reviewers: Jason Gustafson <jason@confluent.io>, David Arthur <mumrah@gmail.com>, Igor Soarez <soarez@apple.com>
2021-02-19 15:46:34 -08:00
Dániel Urbán 202ff6336f
KAFKA-5235: GetOffsetShell: Support for multiple topics and consumer configuration override (KIP-635) (#9430)
This patch implements KIP-635 which mainly adds support for querying offsets of multiple topics/partitions.

Reviewers: David Jacot <djacot@confluent.io>
2021-02-11 12:06:21 +01:00
Colin Patrick McCabe 1f508ea8c3
MINOR: Add StorageTool as specified in KIP-631 (#10043)
Add StorageTool as specified in KIP-631. It can format and describe storage directories.  Fix a bug in `ZkMetaProperties#toString`.

Reviewers: David Arthur <mumrah@gmail.com>
2021-02-08 12:42:40 -08:00
Colin Patrick McCabe 1d3e293c08
MINOR: Add ClusterTool as specified in KIP-631 (#10047)
Add ClusterTool as specified in KIP-631. It can report the current cluster ID, and also send the new RPC for removing broker registrations.

Reviewers: David Arthur <mumrah@gmail.com>
2021-02-08 12:07:39 -08:00
ssugar 70404baffa
MINOR: Fix windows startup scripts to use connect-log4j.properties instead of tools-log4j.properties (#10034)
Co-authored-by: Scott Sugar <ssugar@proserveit.com>

Reviewers: Konstantine Karantasis <k.karantasis@gmail.com>
2021-02-03 11:47:49 -08:00
Jesse Gorzinski 976e6ea0f7
MINOR: Tweak IBM i support in "stop" scripts (#9810)
Reviewers: Mickael Maison <mickael.maison@gmail.com>
2021-01-21 18:18:48 +00:00
Ismael Juma cbf8ad277a
MINOR: Upgrade to Scala 2.13.4 (#9643)
Scala 2.13.4 restores default global `ExecutionContext` to 2.12 behavior
(to fix a perf regression in some use cases) and improves pattern matching
(especially exhaustiveness checking). Most of the changes are related
to the latter as I have enabled the newly introduced `-Xlint:strict-unsealed-patmat`.

More details on the code changes:
* Don't swallow exception in `ReassignPartitionsCommand.topicDescriptionFutureToState`.
* `RequestChannel.Response` should be `sealed`.
* Introduce sealed ClientQuotaManager.BaseUserEntity to avoid false positive
exhaustiveness warning.
* Handle a number of cases where pattern matches were not exhaustive:
either by marking them with @unchecked or by adding a catch-all clause.
* Workaround scalac bug related to exhaustiveness warnings in ZooKeeperClient
* Remove warning suppression annotations related to the optimizer that are no
longer needed in ConsumerGroupCommand and AclAuthorizer.
* Use `forKeyValue` in `AclAuthorizer.acls` as the scala bug preventing us from
using it seems to be fixed.
* Also update scalaCollectionCompat to 2.3.0, which includes minor improvements.

Full release notes:
* https://github.com/scala/scala/releases/tag/v2.13.4
* https://github.com/scala/scala-collection-compat/releases/tag/v2.3.0

Reviewers: Manikumar Reddy <manikumar.reddy@gmail.com>, Chia-Ping Tsai <chia7712@gmail.com>
2020-11-24 10:28:53 -08:00