pub struct TableFragments {
pub table_id: u32,
pub state: i32,
pub fragments: HashMap<u32, Fragment>,
pub actor_status: HashMap<u32, ActorStatus>,
pub actor_splits: HashMap<u32, ConnectorSplits>,
pub ctx: Option<StreamContext>,
pub parallelism: Option<TableParallelism>,
pub max_parallelism: Option<u32>,
pub node_label: String,
pub backfill_done: bool,
}
Expand description
Fragments of a Streaming Job
Fields§
§table_id: u32
§state: i32
§fragments: HashMap<u32, Fragment>
§actor_status: HashMap<u32, ActorStatus>
§actor_splits: HashMap<u32, ConnectorSplits>
Source
and SourceBackfill
are handled together here.
ctx: Option<StreamContext>
§parallelism: Option<TableParallelism>
§max_parallelism: Option<u32>
The max parallelism specified when the streaming job was created, i.e., expected vnode count.
The reason for persisting this value is mainly to check if a parallelism change (via ALTER .. SET PARALLELISM
) is valid, so that the behavior can be consistent with the creation of
the streaming job.
Note that the actual vnode count, denoted by vnode_count
in fragments
, may be different
from this value (see StreamFragmentGraph.max_parallelism
for more details.). As a result,
checking the parallelism change with this value can be inaccurate in some cases. However,
when generating resizing plans, we still take the vnode_count
of each fragment into account.
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 should be used.
node_label: String
Actors of a materialize view, sink, or table can only be scheduled on nodes with matching node_label.
backfill_done: bool
If this is a materialized view: True if backfill is done, else false. If this is a regular table: Always true.
Implementations§
source§impl TableFragments
impl TableFragments
source§impl TableFragments
impl TableFragments
pub fn get_table_id(&self) -> u32
pub fn get_state(&self) -> Result<State, PbFieldNotFound>
pub fn get_fragments(&self) -> &HashMap<u32, Fragment>
pub fn get_actor_status(&self) -> &HashMap<u32, ActorStatus>
pub fn get_actor_splits(&self) -> &HashMap<u32, ConnectorSplits>
pub fn get_ctx(&self) -> Result<&StreamContext, PbFieldNotFound>
pub fn get_parallelism(&self) -> Result<&TableParallelism, PbFieldNotFound>
pub fn get_max_parallelism(&self) -> Result<&u32, PbFieldNotFound>
pub fn get_node_label(&self) -> &String
pub fn get_backfill_done(&self) -> bool
Trait Implementations§
source§impl Clone for TableFragments
impl Clone for TableFragments
source§fn clone(&self) -> TableFragments
fn clone(&self) -> TableFragments
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for TableFragments
impl Debug for TableFragments
source§impl Default for TableFragments
impl Default for TableFragments
source§impl<'de> Deserialize<'de> for TableFragments
impl<'de> Deserialize<'de> for TableFragments
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 TableFragments
impl Message for TableFragments
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 TableFragments
impl PartialEq for TableFragments
source§impl Serialize for TableFragments
impl Serialize for TableFragments
impl StructuralPartialEq for TableFragments
Auto Trait Implementations§
impl Freeze for TableFragments
impl RefUnwindSafe for TableFragments
impl Send for TableFragments
impl Sync for TableFragments
impl Unpin for TableFragments
impl UnwindSafe for TableFragments
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