private static PoolTreeNode createNonPoolNode(Map<String, PoolTreeNode> poolMap, String name, PoolTreeNode root) {
      PoolTreeNode result;
      do {
        name = "<" + name + ">";
        result = poolMap.get(name);
        // We expect this to never happen in practice. Can pool paths even have angled braces?
      } while (result != null);

      result = new PoolTreeNode();
      result.nonPoolName = name;
      poolMap.put(name, result);
      root.children.add(result);
      return result;
    }
A n-ary tree for the pools, each node contains a pool and its children.
ql/src/java/org/apache/hadoop/hive/ql/ddl/workloadmanagement/resourceplan/show/formatter/ShowResourcePlanFormatter.java