Grant Henke has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/9654 )
Change subject: java: key ConnectionCache by address, improve stringification ...................................................................... java: key ConnectionCache by address, improve stringification This changes the ConnectionCache in the Java client to be keyed by InetSocketAddress instead of server UUID. Although we currently assume that an address and UUID have a 1:1 correspondence, the logical purpose of the connection cache is to cache a connection to a specific server endpoint, and if a server were to re-register at a new IP, we'd really need to reconnect. Along the way this also adds and improves toString() methods for a number of core structures in the Java client. These new stringifications helped me debug a recent issue in the client where it wasn't clear that we were connecting to the wrong host. Change-Id: I431b5b6b8af6b81e6ab494d7f84fa2260bb0f941 Reviewed-on: http://gerrit.cloudera.org:8080/9643 Tested-by: Kudu Jenkins Reviewed-by: Grant Henke <[email protected]> (cherry picked from commit 8204f43f0204c172c4a799f9ccda0592d3b02138) Reviewed-on: http://gerrit.cloudera.org:8080/9654 Tested-by: Grant Henke <[email protected]> --- M java/kudu-client/src/main/java/org/apache/kudu/client/AsyncKuduScanner.java M java/kudu-client/src/main/java/org/apache/kudu/client/Connection.java M java/kudu-client/src/main/java/org/apache/kudu/client/ConnectionCache.java M java/kudu-client/src/main/java/org/apache/kudu/client/RemoteTablet.java M java/kudu-client/src/main/java/org/apache/kudu/client/ServerInfo.java M java/kudu-client/src/main/java/org/apache/kudu/client/TableLocationsCache.java M java/kudu-client/src/test/java/org/apache/kudu/client/TestConnectionCache.java M java/kudu-client/src/test/java/org/apache/kudu/client/TestRemoteTablet.java M java/kudu-client/src/test/java/org/apache/kudu/client/TestServerInfo.java A java/kudu-client/src/test/java/org/apache/kudu/client/TestTableLocationsCache.java 10 files changed, 167 insertions(+), 87 deletions(-) Approvals: Grant Henke: Looks good to me, approved; Verified -- To view, visit http://gerrit.cloudera.org:8080/9654 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: branch-1.7.x Gerrit-MessageType: merged Gerrit-Change-Id: I431b5b6b8af6b81e6ab494d7f84fa2260bb0f941 Gerrit-Change-Number: 9654 Gerrit-PatchSet: 2 Gerrit-Owner: Grant Henke <[email protected]> Gerrit-Reviewer: Grant Henke <[email protected]> Gerrit-Reviewer: Kudu Jenkins Gerrit-Reviewer: Todd Lipcon <[email protected]>
