lukasz-antoniak commented on code in PR #2036: URL: https://github.com/apache/cassandra-java-driver/pull/2036#discussion_r2126158693
########## core/src/main/java/com/datastax/oss/driver/internal/core/context/StartupOptionsBuilder.java: ########## @@ -142,4 +150,29 @@ protected String getDriverName() { protected String getDriverVersion() { return Session.OSS_DRIVER_COORDINATES.getVersion().toString(); } + + private String localDcs() { + StringBuilder result = new StringBuilder(); + boolean first = true; + for (Map.Entry<String, LoadBalancingPolicy> entry : + context.getLoadBalancingPolicies().entrySet()) { + String dc = getLocalDc(entry.getValue()); + if (dc != null) { + if (!first) { + result.append(", "); + } else { + first = false; + } + result.append(entry.getKey()).append(": ").append(dc); + } + } + return first ? null : result.toString(); Review Comment: I applied your changes and also added on more unit test to make sure that non-local aware LBPs are skipped. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: pr-unsubscr...@cassandra.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: pr-unsubscr...@cassandra.apache.org For additional commands, e-mail: pr-h...@cassandra.apache.org