Manno15 commented on a change in pull request #1972:
URL: https://github.com/apache/accumulo/pull/1972#discussion_r595376844
##########
File path: core/src/main/java/org/apache/accumulo/fate/zookeeper/ZooLock.java
##########
@@ -60,6 +60,19 @@ public String toString() {
}
+ public static class ZooLockPath {
+ private final String path;
+
+ public ZooLockPath(String path) {
+ this.path = path;
+ }
+
+ @Override
+ public String toString() {
+ return this.path;
+ }
+ }
+
Review comment:
> Just a general observation - would it improve readability if in
addition to toString() that there was a getter (getPath())?
I am not sure if it would improve readability. It could increase robustness
but I do not think it benefits that much.
> Also, did you notice places where the node name was necessary? If so, then
would things be cleaner if there was a getNode() or something that did the
parsing? Might save a few lines here and there - but would gather that code
into a single place.
Most replacements were just for the string with this new path object (and
then having toString when necessary). I did not notice anything about node name
while making these changes.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]