Github user jaltekruse commented on a diff in the pull request: https://github.com/apache/drill/pull/363#discussion_r52084085 --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/physical/EndpointAffinity.java --- @@ -96,6 +96,42 @@ public boolean isAssignmentRequired() { } @Override + public int hashCode() { + final int prime = 31; + int result = 1; + long temp; + temp = Double.doubleToLongBits(affinity); + result = prime * result + (int) (temp ^ (temp >>> 32)); + result = prime * result + ((endpoint == null) ? 0 : endpoint.hashCode()); + return result; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (!(obj instanceof EndpointAffinity)) { + return false; + } + EndpointAffinity other = (EndpointAffinity) obj; + if (Double.doubleToLongBits(affinity) != Double.doubleToLongBits(other.affinity)) { + return false; + } + if (endpoint == null) { + if (other.endpoint != null) { + return false; + } + } else if (!endpoint.equals(other.endpoint)) { --- End diff -- I should have looked more carefully, I was looking at the one in the proto.beans package, but that isn't being used here.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---