dlmarion commented on a change in pull request #2324:
URL: https://github.com/apache/accumulo/pull/2324#discussion_r734435406



##########
File path: core/src/main/java/org/apache/accumulo/fate/zookeeper/ZooUtil.java
##########
@@ -121,4 +131,33 @@ public static void recursiveDelete(ZooKeeper zooKeeper, 
String zPath, NodeMissin
     }
   }
 
+  /**
+   * For debug: print the ZooKeeper Stat with value labels for a more user 
friendly string. The
+   * format matches the zookeeper cli stat command.
+   *
+   * @param stat
+   *          Zookeeper Stat structure
+   * @return a formatted string.
+   */
+  public static String printStat(final Stat stat) {
+
+    if (Objects.isNull(stat)) {
+      return "null";
+    }
+
+    return "\ncZxid = " + String.format("0x%x", stat.getCzxid()) + "\nctime = "

Review comment:
       May want to consider StringBuilder or StringBuilder here




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