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


##########
core/src/main/java/org/apache/accumulo/core/fate/zookeeper/FateLock.java:
##########
@@ -68,16 +72,34 @@ public FateLock(ZooReaderWriter zrw, FateLockPath path) {
     this.path = requireNonNull(path);
   }
 
+  public static class FateLockNode {
+    public final long sequence;
+    public final String lockData;
+
+    private FateLockNode(String nodeName) {
+      int len = nodeName.length();
+      Preconditions.checkArgument(nodeName.startsWith(PREFIX) && 
nodeName.charAt(len - 11) == '#',
+          "Illegal node name %s", nodeName);
+      sequence = Long.parseLong(nodeName.substring(len - 10));
+      lockData = nodeName.substring(PREFIX.length(), len - 11);
+    }
+  }
+
+  // TODO change data arg from byte[] to String.. in the rest of the code its 
always a String.

Review Comment:
   Removed the TODO and #5264.  In the TODO I was thinking of using String, but 
realized using more concrete types would be better.



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