pub struct Fragment {
pub fragment_id: u32,
pub fragment_type_mask: u32,
pub distribution_type: i32,
pub actors: Vec<StreamActor>,
pub state_table_ids: Vec<u32>,
pub upstream_fragment_ids: Vec<u32>,
pub maybe_vnode_count: Option<u32>,
}
Fields§
§fragment_id: u32
§fragment_type_mask: u32
Bitwise-OR of FragmentTypeFlags
distribution_type: i32
§actors: Vec<StreamActor>
§state_table_ids: Vec<u32>
§upstream_fragment_ids: Vec<u32>
Note that this can be derived backwards from the upstream actors of the Actor held by the Fragment, but in some scenarios (e.g. Scaling) it will lead to a lot of duplicate code, so we pre-generate and store it here, this member will only be initialized when creating the Fragment and modified when creating the mv-on-mv
maybe_vnode_count: Option<u32>
Total vnode count of the fragment (then all internal tables). Duplicated from the length of the vnode bitmap in any actor of the fragment.
Can be unset if the fragment is created in older versions where variable vnode count is not
supported, in which case a default value of 256 (or 1 for singleton) should be used.
Use VnodeCountCompat::vnode_count
to access it.
Implementations§
source§impl Fragment
impl Fragment
sourcepub fn distribution_type(&self) -> FragmentDistributionType
pub fn distribution_type(&self) -> FragmentDistributionType
Returns the enum value of distribution_type
, or the default if the field is set to an invalid enum value.
sourcepub fn set_distribution_type(&mut self, value: FragmentDistributionType)
pub fn set_distribution_type(&mut self, value: FragmentDistributionType)
Sets distribution_type
to the provided enum value.
sourcepub fn maybe_vnode_count(&self) -> u32
pub fn maybe_vnode_count(&self) -> u32
Returns the value of maybe_vnode_count
, or the default value if maybe_vnode_count
is unset.
source§impl Fragment
impl Fragment
pub fn get_fragment_id(&self) -> u32
pub fn get_fragment_type_mask(&self) -> u32
pub fn get_distribution_type( &self, ) -> Result<FragmentDistributionType, PbFieldNotFound>
pub fn get_actors(&self) -> &Vec<StreamActor>
pub fn get_state_table_ids(&self) -> &Vec<u32>
pub fn get_upstream_fragment_ids(&self) -> &Vec<u32>
pub fn get_maybe_vnode_count(&self) -> Result<&u32, PbFieldNotFound>
Trait Implementations§
source§impl<'de> Deserialize<'de> for Fragment
impl<'de> Deserialize<'de> for Fragment
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 Fragment
impl Message for Fragment
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
.impl StructuralPartialEq for Fragment
Auto Trait Implementations§
impl Freeze for Fragment
impl RefUnwindSafe for Fragment
impl Send for Fragment
impl Sync for Fragment
impl Unpin for Fragment
impl UnwindSafe for Fragment
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