...
Code Block |
---|
class ElectPreferredReplicaLeaderOptions {
long timeout()
ElectPreferredReplicaLeaderOptions timeout(long timeout)
}
class ElectPreferredReplicaLeaderResult {
Map<TopicPartition, KafkaFuture<Void>> values();
} |
...
No Format |
---|
ElectPreferredReplicaLeaderRequest => [topcPartition] timeout
topicPartition => topic partition_id
topic => STRING
partition_id => INT32
timeout => INT32 |
Where
Field | Description |
---|---|
topic | a topic name |
partition_id | a partition of the topic |
timeout | the time to wait for the election to complete |
The request will require ClusterAction
operation on the Cluster
resource. TODO Or should this be ALTER on the Topic?
Note that a ElectPreferredReplicaLeaderRequest
can be sent to any node in the cluster; it's not necessary to target a request to a leader ir follower broker for a partition.
No Format |
---|
ElectPreferredReplicaLeaderResponse => throttle_time_ms [replica_election_result] throttle_time_ms => INT32 replica_election_result => topic partition_id error_code error_message topic => STRING partition_id => INT32 error_code => INT16 error_message => NULLABLE_STRING |
...
Field | Description |
---|---|
throttle_time_ms | duration in milliseconds for which the request was throttled |
topic | a topic name from the request |
partition_id | a partition id for the topic |
error_code | an error code for that partition |
error_message | more detailed information about any error for that topic |
Anticipated errors:
- INVALID
UNKNOWN_TOPIC_
EXCEPTIONOR_PARTITION (
173) If the topic or partition doesn't exist
on any broker in the cluster. Note that the use of this code is not precisely the same as it's usual meaning of "This server does not host this topic-partition".
REPLICA_LEADER_ELECTION_IN_PROGRESS (new) If there is an election already in progress. The request can be attempted again later
INVALID_REQUEST
(42) If duplicate topics appeared in the request.
NONE
(0) The topic partition count was changed successfully.
...