Commit Graph

224 Commits

Author SHA1 Message Date
Nikolay eea369af94
KAFKA-14588 Log cleaner configuration move to CleanerConfig (#15387)
In order to move ConfigCommand to tools we must move all it's dependencies which includes KafkaConfig and other core classes to java. This PR moves log cleaner configuration to CleanerConfig class of storage module.

Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-03-05 18:11:56 +08:00
Gyeongwon, Do 489a7dd71e
MINOR: Improve Code Style (#15319)
- Removing ! and Unused Imports
- Put a space after the control structure's defining keyword.
- remove unnecessary whitespace a space after the method name in higher-order function invocations.

Reviewers: Divij Vaidya <diviv@amazon.com>
2024-02-09 12:07:20 +01:00
David Arthur 12ce9c7f98 KAFKA-16216: Reduce batch size for initial metadata load during ZK migration
During migration from ZK mode to KRaft mode, there is a step where the kcontrollers load all of the
data from ZK into the metadata log. Previously, we were using a batch size of 1000 for this, but
200 seems better. This PR also adds an internal configuration to control this batch size, for
testing purposes.

Reviewers: Colin P. McCabe <cmccabe@apache.org>
2024-02-01 15:48:52 -08:00
Omnia Ibrahim 127fe7d276
KAFKA-15853: Move AuthorizerUtils and its dependencies to server module (#15167)
Reviewers: Mickael Maison <mickael.maison@gmail.com>
2024-01-31 15:38:14 +01:00
Apoorv Mittal 016bd682fe
KAFKA-16186: Broker metrics for client telemetry (KIP-714) (#15251)
Add the broker metrics defined in KIP-714.

Reviewers: Andrew Schofield <aschofield@confluent.io>, Jun Rao <junrao@gmail.com>
2024-01-30 15:03:09 -08:00
Mickael Maison 3e9ef70853
KAFKA-15853: Move PasswordEncoder to server-common (#15246)
Reviewers: Luke Chen <showuon@gmail.com>, Omnia Ibrahim <o.g.h.ibrahim@gmail.com>
2024-01-30 19:08:50 +01:00
David Jacot 94ab8c16ba
MINOR: Re-add Uniform assignor to the default ones (#15269)
The uniform assignor got accidentally removed by https://github.com/apache/kafka/pull/15158. This patch adds it back. 

Reviewers: Omnia G H Ibrahim <o.g.h.ibrahim@gmail.com>, Mickael Maison <mickael.maison@gmail.com>
2024-01-28 23:59:42 -08:00
Calvin Liu 7e5ef9b509
KAFKA-15585: Implement DescribeTopicPartitions RPC on broker (#14612)
This patch implements the new DescribeTopicPartitions RPC as defined in KIP-966 (ELR). Additionally, this patch adds a broker config "max.request.partition.size.limit" which limits the number of partitions returned by the new RPC.

Reviewers: Artem Livshits <alivshits@confluent.io>, Jason Gustafson <jason@confluent.io>, David Arthur <mumrah@gmail.com>
2024-01-24 15:16:09 -05:00
Apoorv Mittal 208f9e7765
KAFKA-15813: Evict client instances from cache (KIP-714) (#15234)
KIP-714 requires client instance cache in broker which should also have a time-based eviction policy where client instances which are not actively sending metrics should be evicted. KIP mentions This client instance specific state is maintained in broker memory up to MAX(60*1000, PushIntervalMs * 3) milliseconds.

Reviewers: Andrew Schofield <aschofield@confluent.io>, Jun Rao <junrao@gmail.com>
2024-01-23 15:06:02 -08:00
Omnia Ibrahim 62ce551826
KAFKA-15853: Move KafkaConfig.Defaults to server module (#15158)
Reviewers: Mickael Maison <mickael.maison@gmail.com>, Ismael Juma <ismael@juma.me.uk>
, David Jacot <djacot@confluent.io>, Nikolay <NIzhikov@gmail.com>
2024-01-22 15:29:11 +01:00
Apoorv Mittal 556dc2a93f
KAFKA-15811: Enhance request context with client socket port information (KIP-714) (#15190)
PR adds support to capture client socket port information in Request Context. The port from request context is used as matching criteria in filtering clients and shall be used by metrics plugin to fetch port from request context.

Reviewers: Andrew Schofield <aschofield@confluent.io>, Jun Rao <junrao@gmail.com>
2024-01-19 10:28:07 -08:00
Omnia Ibrahim 2f2a0d799a
KAFKA-15853: Move ClientQuotaManagerConfig outside of core (#15159)
Reviewers: Mickael Maison <mickael.maison@gmail.com>, Nikolay <NIzhikov@gmail.com>
2024-01-18 16:15:13 +01:00
Omnia Ibrahim e9f2218d94
KAFKA-15853: Move ReplicationQuotaManagerConfig to server module (#15160)
Reviewers: Mickael Maison <mickael.maison@gmail.com>, Nikolay <nizhikov@apache.org>
2024-01-12 10:47:26 +01:00
Omnia Ibrahim 13a83d58f8
KAFKA-15853: Move ProcessRole to server module (#15166)
Prepare to move KafkaConfig (#15103).

Reviewers: Ismael Juma <ismael@juma.me.uk>
2024-01-10 15:13:06 -08:00
Michael Westerby ccb36fe0c7
KAFKA-15358: Added QueuedReplicaToDirAssignments metric (#14942)
Reviewers: Igor Soarez <i@soarez.me>, Ron Dagostino <rdagostino@confluent.io>
2023-12-12 03:17:00 -05:00
Igor Soarez bf5d3cfd4e
KAFKA-15363: Run completion handlers for duped AssignmentEvent (#14982)
Reviewers: Omnia G H Ibrahim <o.g.h.ibrahim@gmail.com>, Ron Dagostino <rdagostino@confluent.io>
2023-12-11 10:09:16 -05:00
Igor Soarez 8c184b4743
MINOR: Fix some AssignmentsManager bugs (#14954)
- Add proper start & stop for AssignmentsManager's event loop
- Dedupe queued duplicate assignments
- Fix bug where directory ID is resolved too late

Co-authored-by: Gaurav Narula <gaurav_narula2@apple.com>
Reviewers: Colin P. McCabe <cmccabe@apache.org>
2023-12-08 15:37:23 -08:00
Omnia Ibrahim ec92410e59
KAFKA-15363: Broker log directory failure changes (#14790)
Part of JBOD KIP-858, https://cwiki.apache.org/confluence/display/KAFKA/KIP-858%3A+Handle+JBOD+broker+disk+failure+in+KRaft

Reviewers: Igor Soarez <i@soarez.me>, Colin P. McCabe <cmccabe@apache.org>, Ron Dagostino <rdagostino@confluent.io>
2023-12-07 20:44:56 -05:00
Igor Soarez c515bf51f8 KAFKA-15426: Process and persist directory assignments
Handle AssignReplicasToDirs requests, persist metadata changes
with new directory assignments and possible leader elections.

Reviewers: Proven Provenzano <pprovenzano@confluent.io>, Ron Dagostino <rndgstn@gmail.com>, Colin P. McCabe <cmccabe@apache.org>
2023-12-07 11:44:45 -08:00
Apoorv Mittal dc09d7a4e0
KAFKA-15684: Support to describe all client metrics resources (KIP-714) (#14933)
Improvement for KIP-1000 to list client metrics resources in KafkaApis.scala. Using functionality exposed by KIP-1000 to support describe all metrics operations for KIP-714.

Reviewers: Andrew Schofield <aschofield@confluent.io>, Jun Rao <junrao@gmail.com>
2023-12-06 11:09:42 -08:00
Apoorv Mittal 463ed09f4e
KAFKA-15830: Add telemetry API handling (KIP-714) (#14767)
The PR adds handling of telemetry APIs in KafkaAPIs.scala which calls the respective manager to handle the API calls. Also the telemetry plugin which if registered in configs get registered for exporting client metrics.

Reviewers: Jun Rao <junrao@gmail.com>
2023-12-04 16:00:35 -08:00
Apoorv Mittal f1819f4480
KAFKA-15778 & KAFKA-15779: Implement metrics manager (KIP-714) (#14699)
The PR provide implementation for client metrics manager along with other classes. Manager is responsible to support 3 operations:

UpdateSubscription - From kafka-configs.sh and reload from metadata cache.
Process Get Telemetry Request - From KafkaApis.scala
Process Push Telemetry Request - From KafkaApis.scala
Manager maintains an in-memory cache to keep track of client instances against their instance id.

Reviewers: Andrew Schofield <aschofield@confluent.io>, Jun Rao <junrao@gmail.com>
2023-11-29 09:20:07 -08:00
Igor Soarez 9e884bcff5
MINOR: Fix unstable sorting in AssignmentsManagerTest (#14794)
Building AssignReplicasToDirsRequestData relies on iteration over Map entries, which can result in different sorting order. The order does not matter to the semantics of the request, but it can cause issues with test assertions. This issue was introduced in #14369.

Reviewers: Divij Vaidya <diviv@amazon.com>, Ismael Juma <ismael@juma.me.uk>, David Jacot <djacot@confluent.io>
2023-11-20 07:31:45 -08:00
Ismael Juma df78204e05
KAFKA-15854: Move Java classes from `kafka.server` to the `server` module (#14796)
We only move Java classes that have minimal or no dependencies on Scala classes in this PR.

Details:
* Configured `server` module in build files.
* Changed `ControllerRequestCompletionHandler` to be an interface since it has no implementations.
* Cleaned up various import control files.
* Minor build clean-ups for `server-common`.
* Disabled `testAssignmentAggregation` when executed with Java 8, this is an existing issue (see #14794).

For broader context on this change, please check:
* KAFKA-15852: Move server code from `core` to `server` module

Reviewers: Divij Vaidya <diviv@amazon.com>
2023-11-19 22:09:19 -08:00