Commit Graph

3133 Commits

Author SHA1 Message Date
TingIāu "Ting" Kì 0971924ebc
KAFKA-16824: Utils.getHost and Utils.getPort do not catch a lot of invalid host and ports. (#16048)
Modify regex of HOST_PORT_PATTERN to prevent malformed hosts and ports.

Reviewers: Luke Chen <showuon@gmail.com>
2024-05-31 16:50:27 +08:00
Lianet Magrans eb39031cd0
KAFKA-16766: offset fetch timeout exception in new consumer consistent with legacy (#16125)
* Timeout exception fetching offsets

* Tests
2024-05-31 10:33:20 +02:00
Alyssa Huang a8e99eb969
KAFKA-16833 Fixing PartitionInfo and Cluster equals and hashCode (#16062)
Reviewers: Andrew Schofield <aschofield@confluent.io>, Chia-Ping Tsai <chia7712@gmail.com>
2024-05-31 05:00:42 +08:00
Ahmed Najiub 33a292e4dd
MINOR: Adds a test case to test that an exception is thrown in invalid ports (#16112)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-05-31 04:38:23 +08:00
Justine Olshan 5e3df22095
KAFKA-16308 [1/N]: Create FeatureVersion interface and add `--feature` flag and handling to StorageTool (#15685)
As part of KIP-1022, I have created an interface for all the new features to be used when parsing the command line arguments, doing validations, getting default versions, etc.

I've also added the --feature flag to the storage tool to show how it will be used.

Created a TestFeatureVersion to show an implementation of the interface (besides MetadataVersion which is unique) and added tests using this new test feature.

I will add the unstable config and tests in a followup.

Reviewers: David Mao <dmao@confluent.io>, David Jacot <djacot@confluent.io>, Artem Livshits <alivshits@confluent.io>, Jun Rao <junrao@apache.org>
2024-05-29 16:36:06 -07:00
Mickael Maison 3f3f3ac155
MINOR: Delete KafkaSecurityConfigs class (#16113)
Reviewers: Omnia Ibrahim <o.g.h.ibrahim@gmail.com>, Chia-Ping Tsai <chia7712@gmail.com>
2024-05-30 05:55:24 +08:00
Eugene Mitskevich 862ea12cd7
MINOR: Fix rate metric spikes (#15889)
Rate reports value in the form of sumOrCount/monitoredWindowSize. It has a bug in monitoredWindowSize calculation, which leads to spikes in result values.

Reviewers: Jun Rao <junrao@gmail.com>
2024-05-29 13:14:37 -07:00
Frederik Rouleau 4eb60b5104
KAFKA-16507 Add KeyDeserializationException and ValueDeserializationException with record content (#15691)
Implements KIP-1036.

Add raw ConsumerRecord data to RecordDeserialisationException to make DLQ implementation easier.

Reviewers: Kirk True <ktrue@confluent.io>, Andrew Schofield <aschofield@confluent.io>, Matthias J. Sax <matthias@confluent.io>
2024-05-28 14:56:47 -07:00
Lianet Magrans 0143c72e50
KAFKA-16815: Handle FencedInstanceId in HB response (#16047)
Handle FencedInstanceIdException that a consumer may receive in the heartbeat response. This will be the case when a static consumer is removed from the group by and admin client, and another member joins with the same group.instance.id (allowed in). The first member will receive a FencedInstanceId on its next heartbeat. The expectation is that this should be handled as a fatal error.

There are no actual changes in logic with this PR, given that without being handled, the FencedInstanceId was being treated as an "unexpected error", which are all treated as fatal errors, so the outcome remains the same. But we're introducing this small change just for accuracy in the logic and the logs: FencedInstanceId is expected during heartbeat, a log line is shown describing the situation and why it happened (and it's treated as a fatal error, just like it was before this PR).

This PR also improves the test to ensure that the error propagated to the app thread matches the one received in the HB.

Reviewers: Andrew Schofield <aschofield@confluent.io>, David Jacot <djacot@confluent.io>
2024-05-24 05:19:43 -07:00
Kirk True a98c9be6b0
KAFKA-15974: Enforce that event processing respects user-provided timeout (#15640)
The intention of the CompletableApplicationEvent is for a Consumer to enqueue the event and then block, waiting for it to complete. The application thread will block up to the amount of the timeout. This change introduces a consistent manner in which events are expired out by checking their timeout values.

The CompletableEventReaper is a new class that tracks CompletableEvents that are enqueued. Both the application thread and the network I/O thread maintain their own reaper instances. The application thread will track any CompletableBackgroundEvents that it receives and the network I/O thread will do the same with any CompletableApplicationEvents it receives. The application and network I/O threads will check their tracked events, and if any are expired, the reaper will invoke each event's CompletableFuture.completeExceptionally() method with a TimeoutException.

On closing the AsyncKafkaConsumer, both threads will invoke their respective reapers to cancel any unprocessed events in their queues. In this case, the reaper will invoke each event's CompletableFuture.completeExceptionally() method with a CancellationException instead of a TimeoutException to differentiate the two cases.

The overall design for the expiration mechanism is captured on the Apache wiki and the original issue (KAFKA-15848) has more background on the cause.

Note: this change only handles the event expiration and does not cover the network request expiration. That is handled in a follow-up Jira (KAFKA-16200) that builds atop this change.

This change also includes some minor refactoring of the EventProcessor and its implementations. This allows the event processor logic to focus on processing individual events rather than also the handling of batches of events.

Reviewers: Lianet Magrans <lianetmr@gmail.com>, Philip Nee <pnee@confluent.io>, Bruno Cadonna <cadonna@apache.org>
2024-05-22 18:11:10 +02:00
Mickael Maison affe8da54c
KAFKA-7632: Support Compression Levels (KIP-390) (#15516)
Reviewers: Jun Rao <jun@confluent.io>,  Luke Chen <showuon@gmail.com>
Co-authored-by: Lee Dongjin <dongjin@apache.org>
2024-05-21 17:58:49 +02:00
vamossagar12 476d323f5a
KAFKA-16197: Print Connect worker specific logs on poll timeout expiry (#15305)
Reviewers: Luke Chen <showuon@gmail.com>, Greg Harris <greg.harris@aiven.io>
2024-05-20 17:00:04 -07:00
Kuan-Po (Cooper) Tseng 92489995f3
KAFKA-16544 DescribeTopicsResult#allTopicIds and DescribeTopicsResult#allTopicNames should return null instead of throwing NPE (#15979)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-05-18 03:41:10 +08:00
Johnny Hsu 9896d07997
MINOR: Add debug enablement check when using log.debug (#15977)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-05-18 02:53:28 +08:00
Kirk True f9db4fa19c
KAFKA-16787: Remove TRACE level logging from AsyncKafkaConsumer hot path (#15981)
Removed unnecessarily verbose logging.

Reviewers: Lucas Brutschy <lbrutschy@confluent.io>
2024-05-17 08:57:23 +02:00
Andrew Schofield bb3ff0f84a
KAFKA-16759: Handle telemetry push response while terminating (#15957)
When client telemetry is configured in a cluster, Kafka producers and consumers push metrics to the brokers periodically. There is a special push of metrics that occurs when the client is terminating. A state machine in the client telemetry reporter controls its behaviour in different states.

Sometimes, when a client was terminating, it was attempting an invalid state transition from TERMINATING_PUSH_IN_PROGRESS to PUSH_NEEDED when it receives a response to a PushTelemetry RPC. This was essentially harmless because the state transition did not occur but it did cause unsightly log lines to be generated. This PR performs a check for the terminating states when receiving the response and simply remains in the current state.

I added a test to validate the state management in this case. Actually, the test passes before the code change in the PR, but with unsightly log lines.


Reviewers: Manikumar Reddy <manikumar.reddy@gmail.com>,  Apoorv Mittal <amittal@confluent.io>
2024-05-15 21:40:34 +05:30
Kirk True 3f8d11f047
KAFKA-16577: New consumer fails with stop within allotted timeout in consumer_test.py system test (#15784)
The KafkaAsyncConsumer would occasionally fail to stop when wakeup() was invoked. It turns out that there's a race condition between the thread that invokes wakeup() and the thread that is performing an action on the consumer. If the operation's Future is already completed by thread A when thread B invoke's completeExceptionally() inside wakeup(), the WakeupException will be ignored. We should use the return value from completeExceptionally() to determine if that call actually triggered completion of the Future. If that method returns false, that signals that the Future was already completed, and the exception we passed to completeExceptionally() was ignored. Therefore, we then need to return a new WakeupFuture instead of null so that the next call to setActiveTask() will throw the WakeupException.

Reviewers: Lucas Brutschy <lbrutschy@confluent.io>
2024-05-15 11:14:31 +02:00
flashmouse f0291ac74b
KAFKA-15170: Fix rack-aware assignment in AbstractStickyAssignor (#13965)
This PR fixes two kinds of bugs in the new(ish) rack-aware part of the sticky assignment algorithm:

First, when reassigning "owned partitions" to their previous owners, we now have to take the rack placement into account and might not immediately assign a previously-owned partition to its old consumer during this phase. There is a small chance this partition will be assigned to its previous owner during a later stage of the assignment, but if it's not then by definition it has been "revoked" and must be removed from the assignment during the adjustment phase of the CooperativeStickyAssignor according to the cooperative protocol. We need to make sure any partitions removed in this way end up in the "partitionsTransferringOwnership".

Second, the sticky algorithm works in part by keeping track of how many consumers are still "unfilled" when they are at the "minQuota", meaning we may need to assign one more partition to get to the expected number of consumers at the "maxQuota". During the rack-aware round-robin assignment phase, we were not properly clearing the set of unfilled & minQuota consumers once we reached the expected number of "maxQuota" consumers (since by definition that means no more minQuota consumers need to or can be given any more partitions since that would bump them up to maxQuota and exceed the expected count). This bug would result in the entire assignment being failed due to a correctness check at the end which verifies that the "unfilled members" set is empty before returning the assignment. An IllegalStateException would be thrown, failing the rebalancing and sending the group into an endless rebalancing loop until/unless it was lucky enough to produce a new assignment that didn't hit this bug

Reviewers: Anna Sophie Blee-Goldman <ableegoldman@apache.org>
2024-05-14 17:06:05 -07:00
Ivan Vaskevych 2958dcb919
KAFKA-13115; Update doSend doc about possible blocking (#11023)
Reviewers: José Armando García Sancio <jsancio@apache.org>
2024-05-14 10:50:56 -04:00
José Armando García Sancio 440f5f6c09
MINOR; Validate at least one control record (#15912)
Validate that a control batch in the batch accumulator has at least one control record.

Reviewers: Jun Rao <junrao@apache.org>, Chia-Ping Tsai <chia7712@apache.org>
2024-05-14 10:02:29 -04:00
Mickael Maison 0587a9af3d
MINOR: Various cleanups in clients tests (#15877)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>,  Lianet Magrans <lianetmr@gmail.com>
2024-05-14 10:19:00 +02:00
Lianet Magrans e18f61ce46
KAFKA-16695: Improve expired poll logging (#15909)
Improve consumer log for expired poll timer, by showing how much time was the max.poll.interval.ms exceeded. This should be helpful in guiding the user to tune that config on the common case of long-running processing causing the consumer to leave the group. Inspired by other clients that log such information on the same situation.

Reviewers: Anna Sophie Blee-Goldman <ableegoldman@apache.org>, Matthias Sax <mjsax@apache.org>, 
Andrew Schofield <andrew_schofield@live.com>, Kirk True <kirk@kirktrue.pro>
2024-05-13 18:04:54 -07:00
Lianet Magrans ea485a7061
KAFKA-16665: Allow to initialize newly assigned partition's positions without allowing fetching while callback runs (#15856)
Fix to allow to initialize positions for newly assigned partitions, while the onPartitionsAssigned callback is running, even though the partitions remain non-fetchable until the callback completes.

Before this PR, we were not allowing initialization or fetching while the callback was running. The fix here only allows to initialize the newly assigned partition position, and keeps the existing logic for making sure that the partition remains non-fetchable until the callback completes.

The need for this fix came out in one of the connect system tests, that attempts to retrieve a newly assigned partition position with a call to consumer.position from within the onPartitionsAssigned callback (WorkerSinkTask). With this PR, we allow to make such calls (test added), which is the behaviour of the legacy consumer.

Reviewers: Lucas Brutschy <lbrutschy@confluent.io>
2024-05-07 10:40:00 +02:00
Andrew Schofield 4c4ae6e39c
KAFKA-16608 Honour interrupted thread state on KafkaConsumer.poll (#15803)
The contract of KafkaConsumer.poll(Duration) says that it throws InterruptException "if the calling thread is interrupted before or while this function is called". The new KafkaConsumer implementation was not doing this if the thread was interrupted before the poll was called, specifically with a very short timeout. If it ever waited for records, it did check the thread state. If it did not wait for records because of a short timeout, it did not.

Some of the log messages in the code erroneously mentioned timeouts, when they really meant interruption.

Also adds a test for this specific scenario.

Reviewers: Lianet Magrans <lianetmr@gmail.com>, Chia-Ping Tsai <chia7712@gmail.com>
2024-05-07 08:22:41 +08:00
Okada Haruki 5c96ad61d9
KAFKA-16393 read/write sequence of buffers correctly (#15571)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-05-06 19:11:04 +08:00
Chia Chuan Yu 55a00be4e9
MINOR: Replaced Utils.join() with JDK API. (#15823)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-05-06 15:13:01 +08:00
PoAn Yang 970ac07881
KAFKA-16659 KafkaConsumer#position() does not respect wakup when group protocol is CONSUMER (#15853)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-05-06 08:45:11 +08:00
José Armando García Sancio bfe81d6229
KAFKA-16207; KRaft's internal log listener to update voter set (#15671)
Adds support for the KafkaRaftClient to read the control records KRaftVersionRecord and VotersRecord in the snapshot and log. As the control records in the KRaft partition are read, the replica's known set of voters are updated. This change also contains the necessary changes to include the control records when a snapshot is generated by the KRaft state machine.

It is important to note that this commit changes the code and the in-memory state to track the sets of voters but it doesn't change any data that is externally exposed. It doesn't change the RPCs, data stored on disk or configuration.

When the KRaft replica starts the PartitionListener reads the latest snapshot and then log segments up to the LEO, updating the in-memory state as it reads KRaftVersionRecord and VotersRecord. When the replica (leader and follower) appends to the log, the PartitionListener catches up to the new LEO. When the replica truncates the log because of a diverging epoch, the PartitionListener also truncates the in-memory state to the new LEO. When the state machine generate a new snapshot the PartitionListener trims any prefix entries that are not needed. This is all done to minimize the amount of data tracked in-memory and to make sure that it matches the state on disk.

To implement the functionality described above this commit also makes the following changes:

Adds control records for KRaftVersionRecord and VotersRecord. KRaftVersionRecord describes the finalized kraft.version supported by all of the replicas. VotersRecords describes the set of voters at a specific offset.

Changes Kafka's feature version to support 0 as the smallest valid value. This is needed because the default value for kraft.version is 0.

Refactors FileRawSnapshotWriter so that it doesn't directly call the onSnapshotFrozen callback. It adds NotifyingRawSnapshotWriter for calling such callbacks. This reorganization is needed because in this change both the KafkaMetadataLog and the KafkaRaftClient need to react to snapshots getting frozen.

Cleans up KafkaRaftClient's initialization. Removes initialize from RaftClient - this is an implementation detail that doesn't need to be exposed in the interface. Removes RaftConfig.AddressSpec and simplifies the bootstrapping of the static voter's address. The bootstrapping of the address is delayed because of tests. We should be able to simplify this further in future commits.

Update the DumpLogSegment CLI to support the new control records KRaftVersionRecord and VotersRecord.

Fix the RecordsSnapshotReader implementations so that the iterator includes control records. RecordsIterator is extended to support reading the new control records.
Improve the BatchAccumulator implementation to allow multiple control records in one control batch. This is needed so that KRaft can make sure that VotersRecord is included in the same batch as the control record (KRaftVersionRecord) that upgrades the kraft.version to 1.

Add a History interface and default implementation TreeMapHistory. This is used to track all of the sets of voters between the latest snapshot and the LEO. This is needed so that KafkaRaftClient can query for the latest set of voters and so that KafkaRaftClient can include the correct set of voters when the state machine generates a new snapshot at a given offset.

Add a builder pattern for RecordsSnapshotWriter. The new builder pattern also implements including the KRaftVersionRecord and VotersRecord control records in the snapshot as necessary. A KRaftVersionRecord should be appended if the kraft.version is greater than 0 at the snapshot's offset. Similarly, a VotersRecord should be appended to the snapshot with the latest value up to the snapshot's offset.

Reviewers: Jason Gustafson <jason@confluent.io>
2024-05-04 12:43:16 -07:00
Kirk True 9b8aac22ec
KAFKA-16427 KafkaConsumer#position() does not respect timeout when group protocol is CONSUMER (#15843)
The AsyncKafkaConsumer implementation of position(TopicPartition, Duration) was not updating its internal Timer, causing it to execute the loop forever. Adding a call to update the Timer at the bottom of the loop fixes the issue.

An integration test was added to catch this case; it fails without the newly added call to Timer.update(long).

Reviewers: Lianet Magrans <lianetmr@gmail.com>, Chia-Ping Tsai <chia7712@gmail.com>
2024-05-04 10:29:27 +08:00
Kirk True 7c0a302c4d
KAFKA-16555: Consumer's RequestState has incorrect logic to determine if inflight (#15723)
In some cases, the network layer is very fast and can process a response and send out a follow-up request within the same millisecond timestamp. This is causing problems due to the way we determine if we already have an inflight request.

The previous logic for tracking inflight status used timestamps: if the timestamp from the last received response was less than the timestamp from the last sent request, we'd interpret that as having an inflight request. However, this approach would incorrectly return false from RequestState.requestInFlight() if the two timestamps were equal.

One result of this faulty logic is that in such cases, the consumer would accidentally send multiple heartbeat requests to the consumer group coordinator. The consumer group coordinator would interpret these requests as 'join group' requests and create members for each request. Therefore, the coordinator was under the false understanding that there were more members in the group than there really were. Consequently, if your luck was really bad, the coordinator might assign partitions to one of the duplicate members. Those partitions would be assigned to a phantom consumer that was not reading any data, and this led to flaky tests.

This change introduces a stupid simple flag to RequestState that is set in onSendAttempt and cleared in onSuccessfulAttempt, onFailedAttempt, and reset. A new unit test has been added and this has been tested against all of the consumer unit and integration tests, and has removed all known occurrences of phantom consumer group members in the system tests.

Reviewers: Lucas Brutschy <lbrutschy@confluent.io>, Lianet Magrans <lianetmr@gmail.com>, Philip Nee <pnee@confluent.io>
2024-04-30 10:00:17 +02:00
Emanuele Sabellico ba6a73776b
MINOR: Change the documentation of the Brokers field. (#15809)
Change the documentation of the Brokers field to make it clear that it doesn't always have all the
brokers that are listed as replicas.

Reviewer: Colin P. McCabe <cmccabe@apache.org>
2024-04-26 15:53:18 -07:00
Lucas Brutschy 2db87f04b8
KAFKA-16298: Ensure rebalance listener exceptions are propagated to the user on consumer poll (#15742)
When user-defined rebalance listeners fail with an exception, the expectation is that the error should be propagated to the user as a KafkaException and break the poll loop (behavior in the legacy coordinator). The new consumer executes callbacks in the application thread, and sends an event to the background with the callback result and error if any, passing the error along with the event here to the background thread, but does not seem to propagate the exception to the user.

Reviewers: Lianet Magrans <lianetmr@gmail.com>, Kirk True <ktrue@confluent.io>, Bruno Cadonna <cadonna@apache.org>
2024-04-26 10:28:57 +02:00
Lianet Magrans 82844c01d8
KAFKA-16528: Client HB timing fix (#15698)
Fix for resetting HB timer when the request is sent, rather than when a response is received. This ensures a more accurate timing of the HB, so that a member always sends HB on the interval (not in the interval + any delay in receiving the response).
This change, along with the logic already in place for checking in-flights, ensures that if the interval expires but there is a HB in-flight, the next HB is only send after the response for the in-flight is received, without waiting for another full interval. This is btw consistent with the timer reset & inflight behaviour for the auto-commit interval.

Reviewers: Kirk True <ktrue@confluent.io>, Bruno Cadonna <cadonna@apache.org>
2024-04-26 09:29:59 +02:00
Gaurav Narula 025f9816f1
MINOR: fix javadoc warnings (#15527)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-04-26 08:31:52 +08:00
vamossagar12 b8b2415d5e
KAFKA-16592 Add a new constructor which invokes the existing constructor with default value for alternativeString (#15762)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-04-24 20:58:29 +08:00
Omnia Ibrahim cfe5ab5cf2
KAFKA-15853 Move quota configs into server-common package (#15774)
Reviewers: Mickael Maison <mickael.maison@gmail.com>, Chia-Ping Tsai <chia7712@gmail.com>
2024-04-24 13:05:18 +08:00
Eugene Mitskevich 59c781415f
MINOR: Fix io-[wait-]ratio metrics description (#15722)
Implementation of KIP-773 deprecated iotime-total and io-waittime-total metrics. It wasn't expected to mark io-ratio and io-wait-ratio deprecated. However, now they have *Deprecated* in their description. Here is the reason:

    register io-ratio (desc: *Deprecated* The fraction of time ...) -> registered
    register iotime-total (desc: *Deprecated* The total time ...) -> registered
    register io-ratio (desc: The fraction of time ...) -> skipped, the same name already exists in registry
    register io-time-ns-total (desc: The total time ...) -> registered

As a result, io-ratio has incorrect description. The same for io-wait-ratio. This PR fixes these descriptions..

Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-04-22 21:50:38 +08:00
Yu-Chen Lai c519c5c3be
MINOR: use assertInstanceOf to replace assertTrue (#15769)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-04-22 20:37:21 +08:00
Andras Katona f9f65b92cd
MINOR: example.com moved (#15758)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>, Kuan-Po (Cooper) Tseng <brandboat@gmail.com>, Viktor Somogyi-Vass <viktorsomogyi@gmail.com>
2024-04-22 13:37:59 +02:00
Lucas Brutschy ed47e37b28
KAFKA-16103: AsyncConsumer should await pending async commits on commitSync and close (#15613)
The javadoc for KafkaConsumer.commitSync says:

Note that asynchronous offset commits sent previously with the {@link #commitAsync(OffsetCommitCallback)}
(or similar) are guaranteed to have their callbacks invoked prior to completion of this method.

This is not always true in the async consumer, where there is no code at all to make sure that the callback is executed before commitSync returns.

Similarly, the async consumer is also missing logic to await callback execution in close. While the javadoc doesn't explicitly promise callback execution, it promises "completing commits", which one would reasonably expect to include callback execution. Also, the legacy consumer contains some code to execute callbacks before closing.

This change proposed a number of fixes to clean up the callback execution guarantees in the async consumer:

We keep track of the incomplete async commit
futures and wait for them to complete before returning from
commitSync or close (if there is time).
Since we need to block to make sure that our previous commits are
completed, we allow the consumer to wake up.
Some similar gaps are addressed in the legacy consumer, see #15693

Testing
Two new integration tests and a couple of unit tests.

Reviewers: Bruno Cadonna <cadonna@apache.org>, Kirk True <ktrue@confluent.io>, Lianet Magrans <lianetmr@gmail.com>
2024-04-22 13:26:15 +02:00
Apoorv Mittal 76e089142b
KAFKA-16486: Integrate KIP-1019 measurability changes (KIP-714) (#15682)
The PR leverages the changes defined in KIP-1019. Does the cleanup for accessing KafkaMetric field by reflection and uses method exposed by KIP-1019 for metric measurability.

Reviewers: Andrew Schofield <aschofield@confluent.io>, Matthias J. Sax <matthias@confluent.io>
2024-04-19 11:53:12 -07:00
Apoorv Mittal 5d3f8670b4
KAFKA-16280: Expose method to determine metric measurability (KIP-1019) (#15681)
Implements KIP-1019, which exposes method to check if metric is of type Measurable.

Reviewers: Andrew Schofield <aschofield@confluent.io>, Matthias J. Sax <matthias@confluent.io>
2024-04-18 18:13:29 -07:00
Calvin Liu 53ff1a5a58
KAFKA-15585: DescribeTopicPartitions client side change. (#15470)
Add the support for DescribeTopicPartitions API to AdminClient. For this initial implementation, we are simply loading all of the results into memory on the client side. 

Reviewers: Andrew Schofield <aschofield@confluent.io>, Kirk True <ktrue@confluent.io>, David Jacot <djacot@confluent.io>, Artem Livshits <alivshits@confluent.io>, David Arthur <mumrah@gmail.com>
2024-04-18 12:09:14 -04:00
Mickael Maison aee9724ee1
MINOR: Remove unneeded explicit type arguments (#15736)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-04-17 21:55:58 +02:00
Gyeongwon, Do 4e1a23d948
MINOR: Fix typo in OffsetCommitCallbackInvoker's javadoc (#15643)
Reviewers: Mickael Maison <mickael.maison@gmail.com>, Johnny Hsu <johnny.chhsu01@gmail.com>
2024-04-16 18:06:43 +02:00
lixinyang 6ed3bae2c1
MINOR: Fix a few typos in clients and core tests (#15725)
Reviewers: Mickael Maison <mickael.maison@gmail.com>, Luke Chen <showuon@gmail.com>, Igor Soarez<soarez@apple.com>
Co-authored-by: lixinyang <nickxyli@tencent.com>
2024-04-16 17:50:55 +02:00
Mickael Maison fccd7fec66
MINOR: Various cleanups in clients (#15705)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-04-16 15:02:03 +02:00
Kirk True ebeef4eb64
KAFKA-16556: SubscriptionState should not prematurely reset 'pending' partitions (#15724)
Partitions that are marked as pendingOnAssignedCallback should not be reset in resetInitializingPositions(). Pending partitions are omitted from the set returned by initializingPartitions(). As a result, the Consumer does not include them in the set of partitions for which it attempts to load committed offsets. The code used by the Consumer to reset positions (resetInitializingPositions()) should likewise skip partitions marked as pending.

Reviewers: Lucas Brutschy <lbrutschy@confluent.io>
2024-04-16 14:49:02 +02:00
Alok Thatikunta c034cf2953
MINOR: Fix incorrect Java equals comparison of Uuid by reference (#15707)
Reviewers: Justine Olshan <jolshan@confluent.io>, Chia-Ping Tsai <chia7712@gmail.com>
2024-04-13 20:55:48 +08:00
Omnia Ibrahim e2e2f82f2b
KAFKA-15853 Move Sasl and SSL configs out of core (#15656)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-04-10 21:57:52 +08:00