keith-turner commented on code in PR #5786:
URL: https://github.com/apache/accumulo/pull/5786#discussion_r2286135036


##########
core/src/main/java/org/apache/accumulo/core/fate/zookeeper/FateLock.java:
##########
@@ -154,26 +176,14 @@ public static class NodeName implements 
Comparable<NodeName> {
           .memoize(() -> 
FateLockEntry.deserialize(nodeName.substring(PREFIX.length(), len - 11)));
     }
 
-    @Override
-    public int compareTo(NodeName o) {
-      int cmp = Long.compare(sequence, o.sequence);
-      if (cmp == 0) {
-        cmp = fateLockEntry.get().compareTo(o.fateLockEntry.get());
-      }
-      return cmp;
-    }
-
     @Override
     public boolean equals(Object o) {
-      if (o instanceof NodeName) {
-        return this.compareTo((NodeName) o) == 0;
-      }
-      return false;
+      throw new UnsupportedOperationException();
     }
 
     @Override
     public int hashCode() {
-      return Objects.hash(sequence, fateLockEntry.get());
+      throw new UnsupportedOperationException();

Review Comment:
   I suspect these are not used.  I added new fields to the class and rather 
than add complexity to an untested and unused method I made them throw an 
exception.  It is hard to tell if these are actually used, do not have good 
luck looking for what uses these methods in my IDE.  So if something is using 
them it will eventually throw an exception. 
   
   Not sure, but I think these method were initially implemented because the 
class had a compareTo method and a build plugin required these methods also.
   
   I will leave this comment open as a reminder to remove these methods after 
running more test.



-- 
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]

Reply via email to