MINOR: KafkaRaftClient cleanup (#20161)

Various minor cleanups for the KRaft client.

---------

Signed-off-by: Federico Valeri <fedevaleri@gmail.com>

Reviewers: Luke Chen <showuon@gmail.com>
This commit is contained in:
Federico Valeri 2025-07-17 04:41:28 +02:00 committed by GitHub
parent 7e9df7d03d
commit f2cbc7e3f2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 4 deletions

View File

@ -133,7 +133,7 @@ import static org.apache.kafka.snapshot.Snapshots.BOOTSTRAP_SNAPSHOT_ID;
*
* Like Zookeeper, this protocol distinguishes between voters and observers. Voters are
* the only ones who are eligible to handle protocol requests and they are the only ones
* who take part in elections. The protocol does not yet support dynamic quorum changes.
* who take part in elections.
*
* These are the APIs in this protocol:
*
@ -167,10 +167,9 @@ import static org.apache.kafka.snapshot.Snapshots.BOOTSTRAP_SNAPSHOT_ID;
*/
@SuppressWarnings({ "ClassDataAbstractionCoupling", "ClassFanOutComplexity", "ParameterNumber", "NPathComplexity", "JavaNCSS" })
public final class KafkaRaftClient<T> implements RaftClient<T> {
// visible for testing
static final int RETRY_BACKOFF_BASE_MS = 50;
private static final int MAX_NUMBER_OF_BATCHES = 10;
public static final int MAX_FETCH_WAIT_MS = 500;
private static final int MAX_FETCH_WAIT_MS = 500;
// visible for testing
public static final int MAX_BATCH_SIZE_BYTES = 8 * 1024 * 1024;
public static final int MAX_FETCH_SIZE_BYTES = MAX_BATCH_SIZE_BYTES;