Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedClusterAddressInfo(URL activeHeadNodeUrl) protectedClusterAddressInfo(URL activeHeadNodeUrl, int hostManagerPort) protectedClusterAddressInfo(URL activeHeadNodeUrl, List<URL> workerRankUrls, Set<String> hostNames, URL hostManagerUrl, boolean isPrimaryCluster) Deprecated, for removal: This API element is subject to removal in a future version.Constructor for an active clusterprotectedClusterAddressInfo(URL activeHeadNodeUrl, List<URL> workerRankUrls, Set<String> hostNames, URL hostManagerUrl, boolean isPrimaryCluster, boolean isIntraClusterFailoverEnabled) Deprecated, for removal: This API element is subject to removal in a future version.Constructor for intra-cluster failover-enabled systemsprotectedClusterAddressInfo(URL activeHeadNodeUrl, Map<String, String> systemProperties, List<URL> workerRankUrls, Set<String> hostNames, URL hostManagerUrl) Constructor for an active clusterMethod Summary
Modifier and TypeMethodDescriptionbooleandoesClusterContainNode(String hostName) Checks if the given hostname (or IP address) is part of this cluster.booleanGet the HA status (drained value) for this cluster.static booleanDeprecated, for removal: This API element is subject to removal in a future version.Get whether intra-cluster failover is enabledbooleanDeprecated, for removal: This API element is subject to removal in a future version.Gets the URLs of the cluster’s worker ranks, indexed such that entryiis ranki + 1; the head rank is not included.inthashCode()static booleanDeprecated, for removal: This API element is subject to removal in a future version.Get whether intra-cluster failover is enabledbooleanWhether multi-head operations are available on this cluster from this client.booleanAnother getter for the primary cluster boolean flag for convenience.setActiveHeadNodeUrl(URL value) Set the active head node URL.setHaStatus(String value) Set the HA status (drained value) for this cluster.setHostManagerUrl(URL value) Set the host manager URL.setHostNames(Set<String> value) Set the list of host names for all available machines (whether active or passive).setIsIntraClusterFailoverEnabled(boolean value) Deprecated, for removal: This API element is subject to removal in a future version.Set whether this cluster has intra-cluster failover enabled.setIsPrimaryCluster(boolean value) Set whether this cluster is the primary one.setMultiHeadAvailable(boolean value) setSystemProperties(Map<String, String> value) Set the system properties.setWorkerRankUrls(List<URL> value) Set the worker rank URLs.toString()
Constructor Details
ClusterAddressInfo
@Deprecated(since=“7.1.9”, forRemoval=true) protected ClusterAddressInfo(URL activeHeadNodeUrl, List<URL> workerRankUrls, Set<String> hostNames, URL hostManagerUrl, boolean isPrimaryCluster) Deprecated, for removal: This API element is subject to removal in a future version.Constructor for an active clusterClusterAddressInfo
@Deprecated(since=“7.1.9”, forRemoval=true) protected ClusterAddressInfo(URL activeHeadNodeUrl, List<URL> workerRankUrls, Set<String> hostNames, URL hostManagerUrl, boolean isPrimaryCluster, boolean isIntraClusterFailoverEnabled) Deprecated, for removal: This API element is subject to removal in a future version.Constructor for intra-cluster failover-enabled systemsClusterAddressInfo
Throws:ClusterAddressInfo
Throws:
Method Details
getWorkerRankUrls
Gets the URLs of the cluster’s worker ranks, indexed such that entryiis ranki + 1; the head rank is not included.A rank that has been removed from the cluster keeps its slot in this list, as
null. That slot is load-bearing: the worker indices produced by the server’s shard routing table are rank numbers, so dropping it would shift every rank above the removed one and silently misroute sharded records. Code that walks this list must skipnullentries rather than dereference them.Returns:the worker rank URLs, with anullat the slot of every removed rankgetIsPrimaryCluster
Deprecated, for removal: This API element is subject to removal in a future version.isMultiHeadAvailable
public boolean isMultiHeadAvailable()Whether multi-head operations are available on this cluster from this client.Distinct from the
disableAutoDiscoveryoption, 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 usable through its head node, and that loss of capability belongs to the cluster, not to the connection.Returns:whether multi-head is available on this clustersetMultiHeadAvailable
getIsIntraClusterFailoverEnabled
@Deprecated(since=“7.1.9”, forRemoval=true) public static boolean getIsIntraClusterFailoverEnabled()Deprecated, for removal: This API element is subject to removal in a future version.Get whether intra-cluster failover is enabledisPrimaryCluster
public boolean isPrimaryCluster()Another getter for the primary cluster boolean flag for convenience.isIntraClusterFailoverEnabled
Deprecated, for removal: This API element is subject to removal in a future version.Get whether intra-cluster failover is enabledsetActiveHeadNodeUrl
Set the active head node URL. Return this object to be able to chain operations.setSystemProperties
Set the system properties. Return this object to be able to chain operations.setWorkerRankUrls
Set the worker rank URLs. Return this object to be able to chain operations.setHostNames
Set the list of host names for all available machines (whether active or passive). Return this object to be able to chain operations.setHostManagerUrl
Set the host manager URL. Return this object to be able to chain operations.setIsPrimaryCluster
Set whether this cluster is the primary one. Return this object to be able to chain operations.setHaStatus
Set the HA status (drained value) for this cluster. Return this object to be able to chain operations.Parameters:value- The HA status string (e.g., “drained”, “draining”, “not_drained”)setIsIntraClusterFailoverEnabled
@Deprecated(since=“7.1.9”, forRemoval=true) public GPUdbBase.ClusterAddressInfo setIsIntraClusterFailoverEnabled(boolean value) Deprecated, for removal: This API element is subject to removal in a future version.Set whether this cluster has intra-cluster failover enabled. Return this object to be able to chain operations.