keith-turner commented on code in PR #3272:
URL: https://github.com/apache/accumulo/pull/3272#discussion_r1158952357
##########
core/src/main/java/org/apache/accumulo/core/clientImpl/ThriftScanner.java:
##########
@@ -171,6 +173,44 @@ public static boolean getBatchFromServer(ClientContext
context, Range range, Key
throw new AccumuloException("getBatchFromServer: failed");
}
+ enum ServerType {
+ TSERVER, SSERVER
+ }
+
+ static class ScanAddress {
+ final String serverAddress;
+ final ServerType serverType;
+ final TabletLocation tabletInfo;
+
+ public ScanAddress(String serverAddress, ServerType serverType,
TabletLocation tabletInfo) {
+ this.serverAddress = Objects.requireNonNull(serverAddress);
+ this.serverType = Objects.requireNonNull(serverType);
+ this.tabletInfo = Objects.requireNonNull(tabletInfo);
+ }
+
+ public KeyExtent getExtent() {
+ return tabletInfo.getExtent();
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ ScanAddress that = (ScanAddress) o;
+ return serverAddress.equals(that.serverAddress) && serverType ==
that.serverType
+ && getExtent().equals(that.getExtent());
+ }
+
+ @Override
+ public int hashCode() {
+ throw new UnsupportedOperationException();
Review Comment:
Can do that. I checked to ensure TabletLocation implements the hashCode
function and it does.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]