resolve_no_shuffle_actor_mapping

Function resolve_no_shuffle_actor_mapping 

Source
pub fn resolve_no_shuffle_actor_mapping<'a, ActorId: Copy + Eq + Hash + Debug>(
    source_fragment_distribution: DistributionType,
    source_fragment_actors: impl IntoIterator<Item = (ActorId, &'a Option<Bitmap>)>,
    target_fragment_distribution: DistributionType,
    target_fragment_actors: impl IntoIterator<Item = (ActorId, &'a Option<Bitmap>)>,
) -> HashMap<ActorId, ActorId>
Expand description

Resolve 1:1 actor mapping between two no-shuffle-connected fragments.

Returns Vec<(upstream_actor_id, downstream_actor_id)> pairs. The actor id type is generic so the same logic can be reused both for real ActorId mapping and for alignment checks with synthetic ids (e.g. (WorkerId, actor_idx)).

For Single distribution the single actors are paired directly. For Hash distribution actors are matched by their bitmap’s first vnode and full bitmap equality is asserted.