public static String getParent(String node) {
        int idx = node.lastIndexOf(ZNODE_PATH_SEPARATOR);
        return idx <= 0 ? null : node.substring(0, idx);
    }
Returns the full path of the immediate parent of the specified node.

@param node path to get parent of
@return parent of path, null if passed the root node or an invalid node
inlong-tubemq/tubemq-server/src/main/java/org/apache/inlong/tubemq/server/common/zookeeper/ZKUtil.java