...
1// AlterPartitionRequest, proposed in KIP-497 and introduced in Kafka 2.7.0,
2// is an admin request to modify ISR.
3//
4// Version 3 was added for KIP-903 and replaced NewISR.
5AlterPartitionRequest => key 56, max version 3, flexible v0+, admin
6 // The ID of the requesting broker.
7 BrokerID: int32
8 // The epoch of the requesting broker.
9 BrokerEpoch: int64(-1)
10 Topics: [=>]
11 Topic: string // v0-v1
12 TopicID: uuid // v2+
13 Partitions: [=>]
14 Partition: int32
15 // The leader epoch of this partition.
16 LeaderEpoch: int32
17 // The ISR for this partition.
18 NewISR: [int32] // v0-v2
19 NewEpochISR: [=>] // v3+
20 // The broker ID .
21 BrokerID: int32
22 // The broker's epoch; -1 if the epoch check is not supported.
23 BrokerEpoch: int32(-1)
24 // 1 if the partition is recovering from unclean leader election; 0 otherwise
25 LeaderRecoveryState: int8 // v1+
26 // The expected epoch of the partition which is being updated.
27 // For a legacy cluster, this is the ZkVersion in the LeaderAndISR request.
28 PartitionEpoch: int32
29
30AlterPartitionResponse =>
31 ThrottleMillis
32 ErrorCode: int16
33 Topics: [=>]
34 Topic: string // v0-v1
35 TopidID: uuid // v2+
36 Partitions: [=>]
37 Partition: int32
38 ErrorCode: int16
39 // The broker ID of the leader.
40 LeaderID: int32
41 // The leader epoch of this partition.
42 LeaderEpoch: int32
43 // The in-sync replica ids.
44 ISR: [int32]
45 // 1 if the partition is recovering from unclean leader election; 0 otherwise
46 LeaderRecoveryState: int8 // v1+
47 // The current epoch of the partition for KRaft controllers.
48 // The current ZK version for legacy controllers.
49 PartitionEpoch: int32
View as plain text