> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kinetica.com/llms.txt
> Use this file to discover all available pages before exploring further.

# ClusterAddressInfo

> ClusterAddressInfo — Kinetica Rust API

[gpudb\_api](https://docs.kinetica.com/content/api/rust/index.md)::<wbr />[gpudb](https://docs.kinetica.com/content/api/rust/gpudb/index.md)
[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/gpudb.rs#L860-L880)&#x20;

<pre>`pub struct ClusterAddressInfo { /* private fields */ }`</pre>

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

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/gpudb.rs#L882-L1182)
impl [ClusterAddressInfo](https://docs.kinetica.com/content/api/rust/gpudb/struct.ClusterAddressInfo.md)

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/gpudb.rs#L897-L917)
pub fn [new](#method.new)( active\_head\_node\_url: [Url](https://docs.rs/url/2.5.7/url/struct.Url.html), system\_properties: [HashMap](https://doc.rust-lang.org/1.98.1/std/collections/hash/map/struct.HashMap.html)\<[String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html), [String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html)>, worker\_rank\_urls: [Vec](https://doc.rust-lang.org/1.98.1/alloc/vec/struct.Vec.html)\<[Option](https://doc.rust-lang.org/1.98.1/core/option/enum.Option.html)\<[Url](https://docs.rs/url/2.5.7/url/struct.Url.html)>>, host\_names: [HashSet](https://doc.rust-lang.org/1.98.1/std/collections/hash/set/struct.HashSet.html)\<[String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html)>, host\_manager\_url: [Url](https://docs.rs/url/2.5.7/url/struct.Url.html), ) -> Self

Creates a new ClusterAddressInfo for an active cluster.

##### Arguments

<ul>
  <li>`active_head_node_url` - The URL of the active head node</li>
  <li>`system_properties` - System properties map from the cluster</li>
  <li>`worker_rank_urls` - Worker rank URLs, with `None` at the slot of every rank removed from the cluster</li>
  <li>`host_names` - Set of hostnames/IP addresses in the cluster</li>
  <li>`host_manager_url` - URL for the host manager</li>
</ul>

##### Returns

A new ClusterAddressInfo instance with hostnames updated based on rank URLs.

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/gpudb.rs#L929-L970)
pub fn [with\_host\_manager\_port](#method.with_host_manager_port)( active\_head\_node\_url: [Url](https://docs.rs/url/2.5.7/url/struct.Url.html), host\_manager\_port: [u16](https://doc.rust-lang.org/1.98.1/std/primitive.u16.html), ) -> [Result](https://doc.rust-lang.org/1.98.1/core/result/enum.Result.html)\<Self, [KineticaError](https://docs.kinetica.com/content/api/rust/errors/enum.KineticaError.md)>

Creates a ClusterAddressInfo with just an active URL and host manager port.

##### Arguments

<ul>
  <li>`active_head_node_url` - The URL of the active head node</li>
  <li>`host_manager_port` - The port for the host manager</li>
</ul>

##### Returns

A Result containing the new ClusterAddressInfo or a KineticaError.

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/gpudb.rs#L981-L983)
pub fn [from\_url](#method.from_url)(active\_head\_node\_url: [Url](https://docs.rs/url/2.5.7/url/struct.Url.html)) -> [Result](https://doc.rust-lang.org/1.98.1/core/result/enum.Result.html)\<Self, [KineticaError](https://docs.kinetica.com/content/api/rust/errors/enum.KineticaError.md)>

Creates a ClusterAddressInfo with just an active URL using the default host manager port.

##### Arguments

<ul>
  <li>`active_head_node_url` - The URL of the active head node</li>
</ul>

##### Returns

A Result containing the new ClusterAddressInfo or a KineticaError.

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/gpudb.rs#L989-L991)
pub fn [active\_head\_node\_url](#method.active_head_node_url)(\&self) -> &[Url](https://docs.rs/url/2.5.7/url/struct.Url.html)

Returns the active head node URL.

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/gpudb.rs#L994-L996)
pub fn [system\_properties](#method.system_properties)(\&self) -> &[HashMap](https://doc.rust-lang.org/1.98.1/std/collections/hash/map/struct.HashMap.html)\<[String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html), [String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html)>

Returns the system properties map.

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/gpudb.rs#L1004-L1006)
pub fn [worker\_rank\_urls](#method.worker_rank_urls)(\&self) -> &\[[Option](https://doc.rust-lang.org/1.98.1/core/option/enum.Option.html)\<[Url](https://docs.rs/url/2.5.7/url/struct.Url.html)>]

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`](https://docs.kinetica.com/content/api/rust/gpudb/struct.ClusterAddressInfo#method.live_worker_rank_urls).

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/gpudb.rs#L1014-L1016)
pub fn [live\_worker\_rank\_urls](#method.live_worker_rank_urls)(\&self) -> impl [Iterator](https://doc.rust-lang.org/1.98.1/core/iter/traits/iterator/trait.Iterator.html)\<Item = &[Url](https://docs.rs/url/2.5.7/url/struct.Url.html)>

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.

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/gpudb.rs#L1019-L1021)
pub fn [host\_names](#method.host_names)(\&self) -> &[HashSet](https://doc.rust-lang.org/1.98.1/std/collections/hash/set/struct.HashSet.html)\<[String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html)>

Returns the set of hostnames.

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/gpudb.rs#L1024-L1026)
pub fn [host\_manager\_url](#method.host_manager_url)(\&self) -> &[Url](https://docs.rs/url/2.5.7/url/struct.Url.html)

Returns the host manager URL.

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/gpudb.rs#L1029-L1031)
pub fn [is\_primary\_cluster](#method.is_primary_cluster)(\&self) -> [bool](https://doc.rust-lang.org/1.98.1/std/primitive.bool.html)

Returns whether this is the primary cluster.

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/gpudb.rs#L1041-L1043)
pub fn [is\_multi\_head\_available](#method.is_multi_head_available)(\&self) -> [bool](https://doc.rust-lang.org/1.98.1/std/primitive.bool.html)

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.

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/gpudb.rs#L1074-L1076)
pub fn [ha\_status](#method.ha_status)(\&self) -> [Option](https://doc.rust-lang.org/1.98.1/core/option/enum.Option.html)\<&[str](https://doc.rust-lang.org/1.98.1/std/primitive.str.html)>

The HA drained status (“drained”, “draining”, “not\_drained”) the cluster last reported, or `None` if it did not report one.

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/gpudb.rs#L1082-L1085)
pub fn [set\_active\_head\_node\_url](#method.set_active_head_node_url)(\&mut self, value: [Url](https://docs.rs/url/2.5.7/url/struct.Url.html)) -> \&mut Self

Sets the active head node URL. Returns self for method chaining.

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/gpudb.rs#L1088-L1091)
pub fn [set\_system\_properties](#method.set_system_properties)( \&mut self, value: [HashMap](https://doc.rust-lang.org/1.98.1/std/collections/hash/map/struct.HashMap.html)\<[String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html), [String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html)>, ) -> \&mut Self

Sets the system properties. Returns self for method chaining.

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/gpudb.rs#L1097-L1103)
pub fn [set\_worker\_rank\_urls](#method.set_worker_rank_urls)(\&mut self, value: [Vec](https://doc.rust-lang.org/1.98.1/alloc/vec/struct.Vec.html)\<[Option](https://doc.rust-lang.org/1.98.1/core/option/enum.Option.html)\<[Url](https://docs.rs/url/2.5.7/url/struct.Url.html)>>) -> \&mut Self

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`](https://docs.kinetica.com/content/api/rust/gpudb/struct.ClusterAddressInfo#method.worker_rank_urls) for why those slots must be kept.

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/gpudb.rs#L1106-L1109)
pub fn [set\_host\_names](#method.set_host_names)(\&mut self, value: [HashSet](https://doc.rust-lang.org/1.98.1/std/collections/hash/set/struct.HashSet.html)\<[String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html)>) -> \&mut Self

Sets the list of host names. Returns self for method chaining.

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/gpudb.rs#L1112-L1115)
pub fn [set\_host\_manager\_url](#method.set_host_manager_url)(\&mut self, value: [Url](https://docs.rs/url/2.5.7/url/struct.Url.html)) -> \&mut Self

Sets the host manager URL. Returns self for method chaining.

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/gpudb.rs#L1118-L1121)
pub fn [set\_primary\_cluster](#method.set_primary_cluster)(\&mut self, value: [bool](https://doc.rust-lang.org/1.98.1/std/primitive.bool.html)) -> \&mut Self

Sets whether this cluster is the primary one. Returns self for method chaining.

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/gpudb.rs#L1125-L1129)
pub fn [set\_multi\_head\_available](#method.set_multi_head_available)(\&mut self, value: [bool](https://doc.rust-lang.org/1.98.1/std/primitive.bool.html)) -> \&mut Self

Records whether multi-head operations are available on this cluster; see [`ClusterAddressInfo::is_multi_head_available`](https://docs.kinetica.com/content/api/rust/gpudb/struct.ClusterAddressInfo#method.is_multi_head_available).

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/gpudb.rs#L1132-L1135)
pub fn [set\_ha\_status](#method.set_ha_status)(\&mut self, value: [Option](https://doc.rust-lang.org/1.98.1/core/option/enum.Option.html)\<[String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html)>) -> \&mut Self

Sets the HA drained status. Returns self for method chaining.

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/gpudb.rs#L1179-L1181)
pub fn [does\_cluster\_contain\_node](#method.does_cluster_contain_node)(\&self, host\_name: &[str](https://doc.rust-lang.org/1.98.1/std/primitive.str.html)) -> [bool](https://doc.rust-lang.org/1.98.1/std/primitive.bool.html)

Checks if the given hostname (or IP address) is part of this cluster.

##### Arguments

<ul>
  <li>`host_name` - The hostname or IP address to check</li>
</ul>

##### Returns

true if this cluster contains a machine with the given hostname or IP address, false otherwise.

## Trait Implementations

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/gpudb.rs#L859)
impl [Clone](https://doc.rust-lang.org/1.98.1/core/clone/trait.Clone.html) for [ClusterAddressInfo](https://docs.kinetica.com/content/api/rust/gpudb/struct.ClusterAddressInfo.md)

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/gpudb.rs#L859)
fn [clone](https://doc.rust-lang.org/1.98.1/core/clone/trait.Clone.html#tymethod.clone)(\&self) -> [ClusterAddressInfo](https://docs.kinetica.com/content/api/rust/gpudb/struct.ClusterAddressInfo.md)

Returns a duplicate of the value. [Read more](https://doc.rust-lang.org/1.98.1/core/clone/trait.Clone.html#tymethod.clone)

1.0.0 (const: [unstable](https://github.com/rust-lang/rust/issues/142757)) · [Source](https://doc.rust-lang.org/1.98.1/src/core/clone.rs.html#245-247)
fn [clone\_from](https://doc.rust-lang.org/1.98.1/core/clone/trait.Clone.html#method.clone_from)(\&mut self, source: \&Self)

Performs copy-assignment from `source`. [Read more](https://doc.rust-lang.org/1.98.1/core/clone/trait.Clone.html#method.clone_from)

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/gpudb.rs#L859)
impl [Debug](https://doc.rust-lang.org/1.98.1/core/fmt/trait.Debug.html) for [ClusterAddressInfo](https://docs.kinetica.com/content/api/rust/gpudb/struct.ClusterAddressInfo.md)

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/gpudb.rs#L859)
fn [fmt](https://doc.rust-lang.org/1.98.1/core/fmt/trait.Debug.html#tymethod.fmt)(\&self, f: \&mut [Formatter](https://doc.rust-lang.org/1.98.1/core/fmt/struct.Formatter.html)\<'\_>) -> [Result](https://doc.rust-lang.org/1.98.1/core/fmt/type.Result.html)

Formats the value using the given formatter. [Read more](https://doc.rust-lang.org/1.98.1/core/fmt/trait.Debug.html#tymethod.fmt)

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/gpudb.rs#L1213-L1232)
impl [Display](https://doc.rust-lang.org/1.98.1/core/fmt/trait.Display.html) for [ClusterAddressInfo](https://docs.kinetica.com/content/api/rust/gpudb/struct.ClusterAddressInfo.md)

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/gpudb.rs#L1214-L1231)
fn [fmt](https://doc.rust-lang.org/1.98.1/core/fmt/trait.Display.html#tymethod.fmt)(\&self, f: \&mut [Formatter](https://doc.rust-lang.org/1.98.1/core/fmt/struct.Formatter.html)\<'\_>) -> [Result](https://doc.rust-lang.org/1.98.1/core/fmt/type.Result.html)

Formats the value using the given formatter. [Read more](https://doc.rust-lang.org/1.98.1/core/fmt/trait.Display.html#tymethod.fmt)

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/gpudb.rs#L1193)
impl [Eq](https://doc.rust-lang.org/1.98.1/core/cmp/trait.Eq.html) for [ClusterAddressInfo](https://docs.kinetica.com/content/api/rust/gpudb/struct.ClusterAddressInfo.md)

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/gpudb.rs#L1195-L1211)
impl [Hash](https://doc.rust-lang.org/1.98.1/core/hash/trait.Hash.html) for [ClusterAddressInfo](https://docs.kinetica.com/content/api/rust/gpudb/struct.ClusterAddressInfo.md)

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/gpudb.rs#L1196-L1210)
fn [hash](https://doc.rust-lang.org/1.98.1/core/hash/trait.Hash.html#tymethod.hash)\<H: [Hasher](https://doc.rust-lang.org/1.98.1/core/hash/trait.Hasher.html)>(\&self, state: [\&mut H](https://doc.rust-lang.org/1.98.1/std/primitive.reference.html))

Feeds this value into the given [`Hasher`](https://doc.rust-lang.org/1.98.1/core/hash/trait.Hasher.html). [Read more](https://doc.rust-lang.org/1.98.1/core/hash/trait.Hash.html#tymethod.hash)

1.3.0 · [Source](https://doc.rust-lang.org/1.98.1/src/core/hash/mod.rs.html#234-236)

#### fn [hash\_slice](https://doc.rust-lang.org/1.98.1/core/hash/trait.Hash.html#method.hash_slice)\<H>(data: &\[Self], state: [\&mut H](https://doc.rust-lang.org/1.98.1/std/primitive.reference.html))&#xA;where H: [Hasher](https://doc.rust-lang.org/1.98.1/core/hash/trait.Hasher.html), Self: [Sized](https://doc.rust-lang.org/1.98.1/core/marker/trait.Sized.html),

Feeds a slice of this type into the given [`Hasher`](https://doc.rust-lang.org/1.98.1/core/hash/trait.Hasher.html). [Read more](https://doc.rust-lang.org/1.98.1/core/hash/trait.Hash.html#method.hash_slice)

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/gpudb.rs#L1184-L1191)
impl [PartialEq](https://doc.rust-lang.org/1.98.1/core/cmp/trait.PartialEq.html) for [ClusterAddressInfo](https://docs.kinetica.com/content/api/rust/gpudb/struct.ClusterAddressInfo.md)

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/gpudb.rs#L1185-L1190)
fn [eq](https://doc.rust-lang.org/1.98.1/core/cmp/trait.PartialEq.html#tymethod.eq)(\&self, other: \&Self) -> [bool](https://doc.rust-lang.org/1.98.1/std/primitive.bool.html)

Tests for `self` and `other` values to be equal, and is used by `==`.

1.0.0 (const: [unstable](https://github.com/rust-lang/rust/issues/143800)) · [Source](https://doc.rust-lang.org/1.98.1/src/core/cmp.rs.html#263)
fn [ne](https://doc.rust-lang.org/1.98.1/core/cmp/trait.PartialEq.html#method.ne)(\&self, other: [\&Rhs](https://doc.rust-lang.org/1.98.1/std/primitive.reference.html)) -> [bool](https://doc.rust-lang.org/1.98.1/std/primitive.bool.html)

Tests for `!=`. The default implementation is almost always sufficient, and should not be overridden without very good reason.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.