@Override
  public void showResourcePlans(DataOutputStream out, List<WMResourcePlan> resourcePlans) throws HiveException {
    try {
      for (WMResourcePlan plan : resourcePlans) {
        out.write(plan.getName().getBytes(StandardCharsets.UTF_8));
        out.write(Utilities.tabCode);
        out.write(plan.getStatus().name().getBytes(StandardCharsets.UTF_8));
        out.write(Utilities.tabCode);
        String queryParallelism = plan.isSetQueryParallelism() ? Integer.toString(plan.getQueryParallelism()) : "null";
        out.write(queryParallelism.getBytes(StandardCharsets.UTF_8));
        out.write(Utilities.tabCode);
        String defaultPoolPath = plan.isSetDefaultPoolPath() ? plan.getDefaultPoolPath() : "null";
        out.write(defaultPoolPath.getBytes(StandardCharsets.UTF_8));
        out.write(Utilities.newLineCode);
      }
    } catch (IOException e) {
      throw new HiveException(e);
    }
  }
Formats SHOW RESOURCE PLAN(S) results to text format.
ql/src/java/org/apache/hadoop/hive/ql/ddl/workloadmanagement/resourceplan/show/formatter/TextShowResourcePlanFormatter.java