private void mergeServicesWithExplicitParent(
        Map<String, StackModule> allStacks, Map<String, ServiceModule> commonServices, Map<String, ExtensionModule> extensions) throws AmbariException {
    for (ServiceModule service : serviceModules.values()) {
      ServiceInfo serviceInfo = service.getModuleInfo();
      String parent = serviceInfo.getParent();
      if (parent != null) {
        mergeServiceWithExplicitParent(service, parent, allStacks, commonServices, extensions);
      }
    }
  }
Merge services with their explicitly specified parent if one has been specified.
@param allStacks      all stacks in stack definition
@param commonServices all common services specified in the stack definition

@throws AmbariException if an exception occurs while merging child services with their explicit parents
ambari-server/src/main/java/org/apache/ambari/server/stack/ExtensionModule.java