private void finalizeProperties() {
    ResourceDefinition rootDefinition = resourceDefinition;

    QueryInfo rootQueryInfo = new QueryInfo(rootDefinition, requestedProperties);
    TreeNode<QueryInfo> rootNode = new TreeNodeImpl<>(
      null, rootQueryInfo, rootDefinition.getType().name());

    TreeNode<QueryInfo> requestedPropertyTree = buildQueryPropertyTree(this, rootNode);

    mergeFinalizedProperties(renderer.finalizeProperties(
        requestedPropertyTree, isCollectionResource()), this);
  }
Finalize properties for entire query tree before executing query.
ambari-server/src/main/java/org/apache/ambari/server/api/query/QueryImpl.java