private void addSubResource(String name, QueryImpl query) {
    // renderer specified for request only applies to top level query
    query.setRenderer(new DefaultRenderer());
    requestedSubResources.put(name, query);
  }
Add a sub query with the renderer set.

@param name   name of sub resource
@param query  sub resource
ambari-server/src/main/java/org/apache/ambari/server/api/query/QueryImpl.java