pub struct WorkerNode {
pub id: u32,
pub type: i32,
pub host: Option<HostAddress>,
pub state: i32,
pub property: Option<Property>,
pub transactional_id: Option<u32>,
pub resource: Option<Resource>,
pub started_at: Option<u64>,
}
Fields§
§id: u32
§type: i32
§host: Option<HostAddress>
§state: i32
§property: Option<Property>
§transactional_id: Option<u32>
Ranges from 0 to 1023, used to generate the machine ID field in the global unique ID.
resource: Option<Resource>
Resource spec. It’s populated by meta node with the value reported by worker node, when the worker node is added by meta node. It’s not persistent in meta store.
started_at: Option<u64>
Timestamp the worker node is added by meta node, in seconds. It’s populated by meta node, when the worker node is added by meta node. It’s not persistent in meta store.
Implementations§
source§impl WorkerNode
impl WorkerNode
sourcepub fn type(&self) -> WorkerType
pub fn type(&self) -> WorkerType
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: WorkerType)
pub fn set_type(&mut self, value: WorkerType)
Sets type
to the provided enum value.
sourcepub fn state(&self) -> State
pub fn state(&self) -> State
Returns the enum value of state
, or the default if the field is set to an invalid enum value.
sourcepub fn transactional_id(&self) -> u32
pub fn transactional_id(&self) -> u32
Returns the value of transactional_id
, or the default value if transactional_id
is unset.
sourcepub fn started_at(&self) -> u64
pub fn started_at(&self) -> u64
Returns the value of started_at
, or the default value if started_at
is unset.
source§impl WorkerNode
impl WorkerNode
pub fn get_id(&self) -> u32
pub fn get_type(&self) -> Result<WorkerType, PbFieldNotFound>
pub fn get_host(&self) -> Result<&HostAddress, PbFieldNotFound>
pub fn get_state(&self) -> Result<State, PbFieldNotFound>
pub fn get_property(&self) -> Result<&Property, PbFieldNotFound>
pub fn get_transactional_id(&self) -> Result<&u32, PbFieldNotFound>
pub fn get_resource(&self) -> Result<&Resource, PbFieldNotFound>
pub fn get_started_at(&self) -> Result<&u64, PbFieldNotFound>
source§impl WorkerNode
impl WorkerNode
pub fn compute_node_parallelism(&self) -> usize
pub fn parallelism(&self) -> Option<usize>
pub fn resource_group(&self) -> Option<String>
source§impl WorkerNode
impl WorkerNode
pub fn is_streaming_schedulable(&self) -> bool
Trait Implementations§
source§impl Clone for WorkerNode
impl Clone for WorkerNode
source§fn clone(&self) -> WorkerNode
fn clone(&self) -> WorkerNode
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for WorkerNode
impl Debug for WorkerNode
source§impl Default for WorkerNode
impl Default for WorkerNode
source§impl<'de> Deserialize<'de> for WorkerNode
impl<'de> Deserialize<'de> for WorkerNode
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 WorkerNode
impl Message for WorkerNode
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 WorkerNode
impl PartialEq for WorkerNode
source§impl Serialize for WorkerNode
impl Serialize for WorkerNode
impl StructuralPartialEq for WorkerNode
Auto Trait Implementations§
impl Freeze for WorkerNode
impl RefUnwindSafe for WorkerNode
impl Send for WorkerNode
impl Sync for WorkerNode
impl Unpin for WorkerNode
impl UnwindSafe for WorkerNode
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