pub fn generate_replica_map_for_topic(
    spus: &SpuLocalStore,
    param: &TopicReplicaParam,
    from_index: Option<i32>,
) -> ReplicaMap  {
   
    let in_rack_count = spus.spus_in_rack_count();
    let start_index = from_index.unwrap_or(-1);

    // generate partition map (with our without rack assignment)
    if param.ignore_rack_assignment || in_rack_count == 0 {
        generate_partitions_without_rack(&spus,&param, start_index)
    } else {
        generate_partitions_with_rack_assignment(&spus, &param,start_index)
    }
}
///
/// Generate replica map for a specific topic
///
Generate replica map for a specific topic
Generate replica map for a specific topic
pub fn generate_replica_map_for_topic(
    spus: &SpuLocalStore,
    param: &TopicReplicaParam,
    from_index: Option<i32>,
) -> ReplicaMap  {
    let in_rack_count = spus.spus_in_rack_count();
    let start_index = from_index.unwrap_or(-1);
    // generate partition map (with our without rack assignment)
    if param.ignore_rack_assignment || in_rack_count == 0 {
        generate_partitions_without_rack(&spus,&param, start_index)
    } else {
        generate_partitions_with_rack_assignment(&spus, &param,start_index)
    }
}
pub fn generate_replica_map_for_topic ( spus : & SpuLocalStore , param : & TopicReplicaParam , from_index : Option < i32 > , ) -> ReplicaMap { let in_rack_count = spus . spus_in_rack_count ( ) ; let start_index = from_index . unwrap_or ( - 1 ) ; // generate partition map (with our without rack assignment) if param . ignore_rack_assignment || in_rack_count == 0 { generate_partitions_without_rack ( & spus , & param , start_index ) } else { generate_partitions_with_rack_assignment ( & spus , & param , start_index ) } }
Generate replica map for a specific topic
Generate replica map for a specific topic
spus
&SpuLocalStore
param
&TopicReplicaParam
from_index
Option<i32>
spus
&SpuLocalStore
param
&TopicReplicaParam
from_index
Option<i32>