getReplicateConfiguration()
This operation gets the current replicate configuration. Use it to inspect configured clusters and cross-cluster topology before updating replication settings.
public GetReplicateConfigurationResp getReplicateConfiguration()
RETURN TYPE:
GetReplicateConfigurationResp
RETURNS:
A GetReplicateConfigurationResp object that contains the current replication configuration.
getReplicateConfiguration()(ReplicateConfiguration) -The current replication configuration. It has the following getters:
getClusters()(List) - The Milvus clusters in the replication topology. Each MilvusCluster object has the following getters:
getClusterId()(String) -The ID of the cluster.
getUri()(String) -The URI of the cluster.
getToken()(String) -The access token of the cluster.
getPchannels()(List) - The physical channels of the cluster.
getCrossClusterTopologies()(List) - The cross-cluster topologies. Each CrossClusterTopology object has the following getters:
getSourceClusterId()(String) -The ID of the source cluster.
getTargetClusterId()(String) -The ID of the target cluster.
EXCEPTIONS:
-
This exception will be raised when validation fails or the server returns an error for this operation.
Example
import io.milvus.v2.client.ConnectConfig;
import io.milvus.v2.client.MilvusClientV2;
import io.milvus.v2.service.cdc.response.GetReplicateConfigurationResp;
// 1. Set up a client
ConnectConfig connectConfig = ConnectConfig.builder()
.uri("http://localhost:19530")
.token("root:Milvus")
.build();
MilvusClientV2 client = new MilvusClientV2(connectConfig);
// 2. Get the current replication configuration
GetReplicateConfigurationResp resp = client.getReplicateConfiguration();
io.milvus.v2.service.cdc.request.ReplicateConfiguration config = resp.getReplicateConfiguration();
System.out.println(config.getClusters());