private static String removeLastSlash(String root) {
        if (root.endsWith("/")) {
            return root.substring(0, root.lastIndexOf("/"));
        } else {
            return root;
        }
    }
Normalize ZooKeeper path string.
The ZooKeeper path must start with "/" and not end with "/"

@param root   the ZooKeeper path string
@return    the normalized ZooKeeper path string
inlong-tubemq/tubemq-server/src/main/java/org/apache/inlong/tubemq/server/common/zookeeper/ZKUtil.java