From 5d486803f3fad0032b3379a5bc2cec4fa14e0c17 Mon Sep 17 00:00:00 2001 From: Neeraj Kumar Date: Fri, 27 Aug 2021 19:38:57 +0530 Subject: [PATCH] Corrected the property value specification for the new property 'topology-keys' in the docs and updated the version of the driver in the docs. --- architecture/design/smart-driver.md | 4 ++-- docs/content/latest/integrations/smart-driver.md | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/architecture/design/smart-driver.md b/architecture/design/smart-driver.md index 57bcf2cbeeda..640f4abae955 100644 --- a/architecture/design/smart-driver.md +++ b/architecture/design/smart-driver.md @@ -74,7 +74,7 @@ An in-built function called ‘yb_servers’ will be added in Yugabyte. The purp _Connection property:_ -A new property is being added: _load-balance-hosts_ +A new property is being added: _load-balance_ It expects **true/false** as its possible values. It is _false_ by default in which case it will not attempt to distribute connection load to all available servers. @@ -90,7 +90,7 @@ _How does it work:_ An additional property _topology-keys_ is added to indicate only servers belonging to the locations indicated by the topology keys would be considered for establishing connections It expects a _comma_separated_geo_locations_ as it's value(s). -For example: topology-keys=cloud1.region1.zone1,cloud1.region1.zone2 +For example: topology-keys=region1.zone1,region1.zone2 ### Shard Awareness diff --git a/docs/content/latest/integrations/smart-driver.md b/docs/content/latest/integrations/smart-driver.md index bc13e39c3e1a..704c86607b58 100644 --- a/docs/content/latest/integrations/smart-driver.md +++ b/docs/content/latest/integrations/smart-driver.md @@ -36,7 +36,7 @@ To get the driver from Maven, add the following lines to your Maven project: com.yugabyte jdbc-yugabytedb - 42.2.7-5-beta.1 + 42.2.7-5-beta.5 ``` @@ -68,7 +68,7 @@ To build the driver locally, follow this procedure: com.yugabyte jdbc-yugabytedb - 42.2.7-yb-5-beta.1 + 42.2.7-yb-5-beta.5 ``` @@ -76,7 +76,7 @@ To build the driver locally, follow this procedure: **Cluster-aware** load balancing is performed using the `load-balance` connection property, which is disabled by default. You can enable it by setting its value to `true`. -**Topology-aware** load balancing additionally requires the `topology-keys` connection property, which accepts a comma-separated list of geolocation values. You can specify a geolocation as cloud:region:zone. +**Topology-aware** load balancing additionally requires the `topology-keys` connection property, which accepts a comma-separated list of geolocation values. You can specify a geolocation as region:zone To use the Smart Driver, do the following: @@ -92,7 +92,7 @@ To use the Smart Driver, do the following: To specify topology keys, you set the `topology-keys` property to comma separated values, as per the following example: ```java - String yburl = "jdbc:postgresql://127.0.0.1:5433/yugabyte?user=yugabyte&password=yugabyte&load-balance=true&topology-keys=cloud1:region1:zone1,cloud1:region1.zone2"; + String yburl = "jdbc:postgresql://127.0.0.1:5433/yugabyte?user=yugabyte&password=yugabyte&load-balance=true&topology-keys=region1:zone1,region1.zone2"; DriverManager.getConnection(yburl); ``` @@ -104,7 +104,7 @@ To use the Smart Driver, do the following: ds.setUrl(jdbcUrl); ds.setLoadBalance("true"); // Set topology keys to enable topology-aware distribution - ds.setTopologyKeys("cloud1.region1.zone1,cloud1.region2.zone2"); + ds.setTopologyKeys("region1.zone1,region2.zone2"); // Provide more end points to prevent first connection failure // if an initial contact point is not available ds.setAdditionalEndpoints("127.0.0.2:5433,127.0.0.3:5433"); @@ -128,7 +128,7 @@ To use the Smart Driver, do the following: String additionalEndpoints = "127.0.0.2:5433,127.0.0.3:5433,127.0.0.4:5433,127.0.0.5:5433"; poolProperties.setProperty("dataSource.additionalEndpoints", additionalEndpoints); // Load balance between specific geo-locations using topology keys - String geoLocations = "cloud1.region1.zone1,cloud1.region2.zone2"; + String geoLocations = "region1.zone1,region2.zone2"; poolProperties.setProperty("dataSource.topologyKeys", geoLocations); poolProperties.setProperty("poolName", name);