pub struct ClusterAddressInfo /* private fields */ Contains address information for a Kinetica cluster.
This struct stores information about a cluster including its active head node URL, worker rank URLs, hostnames, host manager URL, and system properties.
Implementations
Creates a new ClusterAddressInfo for an active cluster.
active_head_node_url- The URL of the active head nodesystem_properties- System properties map from the clusterworker_rank_urls- Worker rank URLs, withNoneat the slot of every rank removed from the clusterhost_names- Set of hostnames/IP addresses in the clusterhost_manager_url- URL for the host manager
A new ClusterAddressInfo instance with hostnames updated based on rank URLs.
pub fn with_host_manager_port( active_head_node_url: Url, host_manager_port: u16, ) -> Result<Self, KineticaError>
Creates a ClusterAddressInfo with just an active URL and host manager port.
active_head_node_url- The URL of the active head nodehost_manager_port- The port for the host manager
A Result containing the new ClusterAddressInfo or a KineticaError.
Creates a ClusterAddressInfo with just an active URL using the default host manager port.
active_head_node_url- The URL of the active head node
A Result containing the new ClusterAddressInfo or a KineticaError.
pub fn active_head_node_url(&self) -> &Url
Returns the active head node URL.
Returns the system properties map.
pub fn worker_rank_urls(&self) -> &[Option<Url>]
Returns the worker rank URLs, where entry i is rank i + 1.
A rank removed from the cluster keeps its slot, as None, so that these indices stay aligned with the rank numbering used by the shard routing table. Callers walking this list must skip the empty slots; to iterate only reachable ranks, use Self::live_worker_rank_urls.
pub fn live_worker_rank_urls(&self) -> impl Iterator<Item = &Url>
Returns the URLs of the worker ranks still present in the cluster, skipping the empty slots left by removed ranks.
Use this for health checks and hostname collection — anything that visits ranks without caring which rank number each one is. Never use it for routing: it is compacted, so its indices are not rank numbers.
pub fn host_names(&self) -> &HashSet<String>
Returns the set of hostnames.
pub fn host_manager_url(&self) -> &Url
Returns the host manager URL.
pub fn is_primary_cluster(&self) -> bool
Returns whether this is the primary cluster.
pub fn is_multi_head_available(&self) -> bool
Whether multi-head operations are available on this cluster from this client.
Distinct from the disable_auto_discovery option, which records what the user asked for and applies to the whole HA ring. This records what was actually observed for one cluster: a cluster whose worker addresses this client cannot reach is still usable through its head node, and that loss of capability belongs to the cluster, not to the connection.
The HA drained status (“drained”, “draining”, “not_drained”) the cluster last reported, or None if it did not report one.
pub fn set_active_head_node_url(&mut self, value: Url) -> &mut Self
Sets the active head node URL. Returns self for method chaining.
Sets the system properties. Returns self for method chaining.
Sets the worker rank URLs. Returns self for method chaining.
None marks the slot of a rank removed from the cluster; see Self::worker_rank_urls for why those slots must be kept.
pub fn set_host_names(&mut self, value: HashSet<String>) -> &mut Self
Sets the list of host names. Returns self for method chaining.
pub fn set_host_manager_url(&mut self, value: Url) -> &mut Self
Sets the host manager URL. Returns self for method chaining.
pub fn set_primary_cluster(&mut self, value: bool) -> &mut Self
Sets whether this cluster is the primary one. Returns self for method chaining.
pub fn set_multi_head_available(&mut self, value: bool) -> &mut Self
Records whether multi-head operations are available on this cluster; see ClusterAddressInfo::is_multi_head_available.
pub fn set_ha_status(&mut self, value: Option<String>) -> &mut Self
Sets the HA drained status. Returns self for method chaining.
pub fn does_cluster_contain_node(&self, host_name: &str) -> bool
Checks if the given hostname (or IP address) is part of this cluster.
host_name- The hostname or IP address to check
true if this cluster contains a machine with the given hostname or IP address, false otherwise.
Trait Implementations
impl Clone for ClusterAddressInfo
fn clone(&self) -> ClusterAddressInfo
fn clone_from(&mut self, source: &Self)
source. Read more