risingwave_common::hash

Type Alias ActorMapping

source
pub type ActorMapping = VnodeMapping<Actor>;
Expand description

A mapping from VirtualNode to ActorId.

Aliased Type§

struct ActorMapping {
    original_indices: Vec<u32>,
    data: Vec<u32>,
}

Fields§

§original_indices: Vec<u32>§data: Vec<u32>

Implementations§

source§

impl ActorMapping

source

pub fn to_worker_slot( &self, actor_to_worker: &HashMap<ActorId, u32>, ) -> WorkerSlotMapping

Transform the actor mapping to the worker slot mapping. Note that the parameter is a mapping from actor to worker.

source

pub fn from_protobuf(proto: &ActorMappingProto) -> Self

Create an actor mapping from the protobuf representation.

source

pub fn to_protobuf(&self) -> ActorMappingProto

Convert this actor mapping to the protobuf representation.