/// Create new partition spec from replica mapping with topic spec. This assume first replica is leader
Create new partition spec from replica mapping with topic spec. This assume first replica is leader
Create new partition spec from replica mapping with topic spec . This assume first replica is leader
pub fn from_replicas(replicas: Vec<i32>, topic: &TopicSpec) -> Self {
        let leader = if replicas.is_empty() { 0 } else { replicas[0] };
        Self {
            leader,
            replicas,
            cleanup_policy: topic.get_clean_policy().cloned(),
            storage: topic.get_storage().cloned(),
            compression_type: topic.get_compression_type().clone(),
        }
    }
pub fn from_replicas ( replicas : Vec < i32 > , topic : & TopicSpec ) -> Self { let leader = if replicas . is_empty ( ) { 0 } else { replicas [ 0 ] } ; Self { leader , replicas , cleanup_policy : topic . get_clean_policy ( ) . cloned ( ) , storage : topic . get_storage ( ) . cloned ( ) , compression_type : topic . get_compression_type ( ) . clone ( ) , } }
Create new partition spec from replica mapping with topic spec.
Create new partition spec from replica mapping with topic spec .
replicas
Vec<i32>
topic
&TopicSpec