pub struct Dispatcher {
pub type: i32,
pub dist_key_indices: Vec<u32>,
pub output_indices: Vec<u32>,
pub hash_mapping: Option<ActorMapping>,
pub dispatcher_id: u64,
pub downstream_actor_id: Vec<u32>,
}
Expand description
A dispatcher redistribute messages. We encode both the type and other usage information in the proto.
Fields§
§type: i32
§dist_key_indices: Vec<u32>
Indices of the columns to be used for hashing. For dispatcher types other than HASH, this is ignored.
output_indices: Vec<u32>
Indices of the columns to output. In most cases, this contains all columns in the input. But for some cases like MV on MV or schema change, we may only output a subset of the columns.
hash_mapping: Option<ActorMapping>
The hash mapping for consistent hash. For dispatcher types other than HASH, this is ignored.
dispatcher_id: u64
Dispatcher can be uniquely identified by a combination of actor id and dispatcher id. This is exactly the same as its downstream fragment id.
downstream_actor_id: Vec<u32>
Number of downstreams decides how many endpoints a dispatcher should dispatch.
Implementations§
source§impl Dispatcher
impl Dispatcher
sourcepub fn type(&self) -> DispatcherType
pub fn type(&self) -> DispatcherType
Returns the enum value of type
, or the default if the field is set to an invalid enum value.
sourcepub fn set_type(&mut self, value: DispatcherType)
pub fn set_type(&mut self, value: DispatcherType)
Sets type
to the provided enum value.
source§impl Dispatcher
impl Dispatcher
pub fn get_type(&self) -> Result<DispatcherType, PbFieldNotFound>
pub fn get_dist_key_indices(&self) -> &Vec<u32>
pub fn get_output_indices(&self) -> &Vec<u32>
pub fn get_hash_mapping(&self) -> Result<&ActorMapping, PbFieldNotFound>
pub fn get_dispatcher_id(&self) -> u64
pub fn get_downstream_actor_id(&self) -> &Vec<u32>
Trait Implementations§
source§impl Clone for Dispatcher
impl Clone for Dispatcher
source§fn clone(&self) -> Dispatcher
fn clone(&self) -> Dispatcher
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for Dispatcher
impl Debug for Dispatcher
source§impl Default for Dispatcher
impl Default for Dispatcher
source§impl<'de> Deserialize<'de> for Dispatcher
impl<'de> Deserialize<'de> for Dispatcher
source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
source§impl Message for Dispatcher
impl Message for Dispatcher
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.source§impl PartialEq for Dispatcher
impl PartialEq for Dispatcher
source§impl Serialize for Dispatcher
impl Serialize for Dispatcher
impl StructuralPartialEq for Dispatcher
Auto Trait Implementations§
impl Freeze for Dispatcher
impl RefUnwindSafe for Dispatcher
impl Send for Dispatcher
impl Sync for Dispatcher
impl Unpin for Dispatcher
impl UnwindSafe for Dispatcher
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request