pub struct NewPartitions { /* private fields */ }Expand description
Describes new partitions for a particular topic in a call to
Admin::create_partitions.
Implementations§
Source§impl NewPartitions
impl NewPartitions
Sourcepub fn increase_to(total_count: i32) -> Self
pub fn increase_to(total_count: i32) -> Self
Increase the partition count for a topic to the given total_count.
The assignment of new replicas to brokers will be decided by the broker.
total_count is the total number of partitions after the operation
succeeds.
§Arguments
total_count- The total number of partitions after the operation succeeds.
Sourcepub fn increase_to_with_new_assignments(
total_count: i32,
new_assignments: Vec<Vec<i32>>,
) -> Self
pub fn increase_to_with_new_assignments( total_count: i32, new_assignments: Vec<Vec<i32>>, ) -> Self
Increase the partition count for a topic to the given total_count
assigning the new partitions according to the given new_assignments.
The length of the given new_assignments should equal
total_count - old_count, since the assignment of existing partitions
is not changed. Each inner list of new_assignments should have a
length equal to the topic’s replication factor. The first broker id in
each inner list is the “preferred replica”.
total_count is the total number of partitions after the operation
succeeds; new_assignments are the replica assignments for the new
partitions.
§Arguments
total_count- The total number of partitions after the operation succeeds.new_assignments- The replica assignments for the new partitions.
Sourcepub fn total_count(&self) -> i32
pub fn total_count(&self) -> i32
Returns the total number of partitions after the operation succeeds.
Trait Implementations§
Source§impl Clone for NewPartitions
impl Clone for NewPartitions
Source§fn clone(&self) -> NewPartitions
fn clone(&self) -> NewPartitions
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more